summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenis Vlasenko2007-07-18 18:33:18 +0000
committerDenis Vlasenko2007-07-18 18:33:18 +0000
commit960eca66b544347139761e0fbbb9ee9b3f7b3e0a (patch)
treede2dc7b7d782f3e6c39b37b616476ca88c9b7b34 /testsuite
parentaf1bd0962527ae7c3b75fcc028186e5def6141d5 (diff)
downloadbusybox-960eca66b544347139761e0fbbb9ee9b3f7b3e0a.zip
busybox-960eca66b544347139761e0fbbb9ee9b3f7b3e0a.tar.gz
awk: actually do "svn add" for testsuite
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/awk.tests20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
new file mode 100755
index 0000000..9165741
--- /dev/null
+++ b/testsuite/awk.tests
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# awk tests.
+# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
+# Licensed under GPL v2, see file LICENSE for details.
+
+. testing.sh
+
+# testing "description" "arguments" "result" "infile" "stdin"
+
+testing "awk -F case 0" "awk -F '[#]' '{ print NF }'" "" "" ""
+testing "awk -F case 1" "awk -F '[#]' '{ print NF }'" "0\n" "" "\n"
+testing "awk -F case 2" "awk -F '[#]' '{ print NF }'" "2\n" "" "#\n"
+testing "awk -F case 3" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#\n"
+testing "awk -F case 4" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#zz\n"
+testing "awk -F case 5" "awk -F '[#]' '{ print NF }'" "4\n" "" "#abc##zz\n"
+testing "awk -F case 6" "awk -F '[#]' '{ print NF }'" "4\n" "" "z#abc##zz\n"
+testing "awk -F case 7" "awk -F '[#]' '{ print NF }'" "5\n" "" "z##abc##zz\n"
+
+exit $FAILCOUNT