aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtestsuite/awk.tests11
1 files changed, 9 insertions, 2 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 06a531d96..92c83d719 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -398,12 +398,19 @@ testing 'awk do not allow "str"++' \
398 '' \ 398 '' \
399 'anything' 399 'anything'
400 400
401#gawk compat: FS regex matches only non-empty separators: 401# gawk compat: FS regex matches only non-empty separators:
402#with -*, the splitting is NOT f o o b a r, but foo bar: 402# with -*, the splitting is NOT f o o b a r, but foo bar:
403testing 'awk FS regex which can match empty string' \ 403testing 'awk FS regex which can match empty string' \
404 "awk -F '-*' '{print \$1 \"-\" \$2 \"=\" \$3 \"*\" \$4}'" \ 404 "awk -F '-*' '{print \$1 \"-\" \$2 \"=\" \$3 \"*\" \$4}'" \
405 "foo-bar=*\n" \ 405 "foo-bar=*\n" \
406 '' \ 406 '' \
407 'foo--bar' 407 'foo--bar'
408 408
409# last+1 field should be empty (had a bug where it wasn't)
410testing 'awk $NF is empty' \
411 "awk -F '=+' '{print \$NF}'" \
412 "\n" \
413 '' \
414 'a=====123='
415
409exit $FAILCOUNT 416exit $FAILCOUNT