awk: add a test that $NF is empty

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2020-12-04 19:00:06 +01:00
parent f4f6e5144b
commit 758c2bd58e

View File

@ -406,4 +406,11 @@ testing 'awk FS regex which can match empty string' \
'' \
'foo--bar'
# last+1 field should be empty (had a bug where it wasn't)
testing 'awk $NF is empty' \
"awk -F '=+' '{print \$NF}'" \
"\n" \
'' \
'a=====123='
exit $FAILCOUNT