aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-12-02 19:07:31 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-12-02 19:07:31 +0100
commit665a65953076ea21be49250b8279ddb1f0f99f38 (patch)
treebfb46738da9fec6715843197b5987ad56d4fcf76 /testsuite
parent50ead33c45919abffde35313daac4c2dfd8641ca (diff)
downloadbusybox-w32-665a65953076ea21be49250b8279ddb1f0f99f38.tar.gz
busybox-w32-665a65953076ea21be49250b8279ddb1f0f99f38.tar.bz2
busybox-w32-665a65953076ea21be49250b8279ddb1f0f99f38.zip
awk: FS regex matches only non-empty separators (gawk compat)
function old new delta awk_split 484 553 +69 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/awk.tests7
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 87f6b5007..06a531d96 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -398,5 +398,12 @@ testing 'awk do not allow "str"++' \
398 '' \ 398 '' \
399 'anything' 399 'anything'
400 400
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:
403testing 'awk FS regex which can match empty string' \
404 "awk -F '-*' '{print \$1 \"-\" \$2 \"=\" \$3 \"*\" \$4}'" \
405 "foo-bar=*\n" \
406 '' \
407 'foo--bar'
401 408
402exit $FAILCOUNT 409exit $FAILCOUNT