diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2023-05-27 16:16:58 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-05-27 16:17:38 +0200 |
commit | 84ff1825dd82e8de45020e3def34d1430d8e5a99 (patch) | |
tree | 3fc6b7037c6e3a1fc1e43878efb0f7e6c5eb64da /testsuite/awk.tests | |
parent | 9225f9684fedd5c997fc729fee29f8ac402b8db9 (diff) | |
download | busybox-w32-84ff1825dd82e8de45020e3def34d1430d8e5a99.tar.gz busybox-w32-84ff1825dd82e8de45020e3def34d1430d8e5a99.tar.bz2 busybox-w32-84ff1825dd82e8de45020e3def34d1430d8e5a99.zip |
awk: fix splitting with default FS
function old new delta
awk_split 543 544 +1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-x | testsuite/awk.tests | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index ddc51047b..8ab1c6891 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests | |||
@@ -540,4 +540,11 @@ testing 'awk assign while assign' \ | |||
540 | │ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%] | 540 | │ trim/eff : 57.02%/26, 0.00% │ [cpu000:100%] |
541 | └────────────────────────────────────────────────────┘^C" | 541 | └────────────────────────────────────────────────────┘^C" |
542 | 542 | ||
543 | # If field separator FS=' ' (default), fields are split only on | ||
544 | # space or tab or linefeed, NOT other whitespace. | ||
545 | testing 'awk does not split on CR (char 13)' \ | ||
546 | "awk '{ \$1=\$0; print }'" \ | ||
547 | 'word1 word2 word3\r word2 word3\r\n' \ | ||
548 | '' 'word1 word2 word3\r' | ||
549 | |||
543 | exit $FAILCOUNT | 550 | exit $FAILCOUNT |