summaryrefslogtreecommitdiff
path: root/testsuite/awk.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-xtestsuite/awk.tests7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 87f6b50..06a531d 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -398,5 +398,12 @@ testing 'awk do not allow "str"++' \
'' \
'anything'
+#gawk compat: FS regex matches only non-empty separators:
+#with -*, the splitting is NOT f o o b a r, but foo bar:
+testing 'awk FS regex which can match empty string' \
+ "awk -F '-*' '{print \$1 \"-\" \$2 \"=\" \$3 \"*\" \$4}'" \
+ "foo-bar=*\n" \
+ '' \
+ 'foo--bar'
exit $FAILCOUNT