aboutsummaryrefslogtreecommitdiff
path: root/testsuite/awk.tests
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-12 13:54:13 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-12 13:54:13 +0000
commit67b5eeb93324f7484836be705698e72008498fe5 (patch)
tree146cb9dc174befb20d6a0d75f88bf3cef9cc82ee /testsuite/awk.tests
parent32a385f5b0a74ca886e69472aaa1de8045a1ddbd (diff)
downloadbusybox-67b5eeb93324f7484836be705698e72008498fe5.tar.gz
awk: fix long field separators case. By Ian Wienand (ianw AT vmware.com)
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-xtestsuite/awk.tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 8e72dd38f..0db99ab21 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -22,6 +22,12 @@ testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4.29497e+09\n" ""
testing "awk hex const 2" "awk '{ print or(0x80000000,1) }'" "2.14748e+09\n" "" "\n"
testing "awk oct const" "awk '{ print or(01234,1) }'" "669\n" "" "\n"
+# long field seps requiring regex
+testing "awk long field sep" "awk -F-- '{ print NF, length(\$NF), \$NF }'" \
+ "2 0 \n3 0 \n4 0 \n5 0 \n" \
+ "" \
+ "a--\na--b--\na--b--c--\na--b--c--d--"
+
# '@(samp|code|file)\{' is an invalid extended regex (unmatched '{'),
# but gawk 3.1.5 does not bail out on it.
testing "awk gsub falls back to non-extended-regex" \