diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/awk.tests | 3 | ||||
-rwxr-xr-x | testsuite/comm.tests | 19 |
2 files changed, 20 insertions, 2 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index f69da2c..4eabd75 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests @@ -1,12 +1,11 @@ #!/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 "description" "command" "result" "infile" "stdin" testing "awk -F case 0" "awk -F '[#]' '{ print NF }'" "" "" "" testing "awk -F case 1" "awk -F '[#]' '{ print NF }'" "0\n" "" "\n" diff --git a/testsuite/comm.tests b/testsuite/comm.tests new file mode 100755 index 0000000..44169f9 --- /dev/null +++ b/testsuite/comm.tests @@ -0,0 +1,19 @@ +#!/bin/sh + +# Copyright 2008 by Denys Vlasenko <vda.linux@googlemail.com> +# Licensed under GPL v2, see file LICENSE for details. + +. testing.sh + +# testing "description" "command" "result" "infile" "stdin" + +testing "comm test 1" "comm input -" "\t123\n""456\n""abc\n""\tdef\n" "456\nabc\n" "123\ndef\n" +testing "comm test 2" "comm - input" "123\n""\t456\n""\tabc\n""def\n" "456\nabc\n" "123\ndef\n" +testing "comm test 3" "comm input -" "abc\n""\tdef\n""xyz\n" "abc\nxyz\n" "def\n" +testing "comm test 4" "comm - input" "\tabc\n""def\n""\txyz\n" "abc\nxyz\n" "def\n" +testing "comm test 5" "comm input -" "123\n""abc\n""\tdef\n" "123\nabc\n" "def\n" +testing "comm test 6" "comm - input" "\t123\n""\tabc\n""def\n" "123\nabc\n" "def\n" +testing "comm unterminated line 1" "comm input -" "abc\n""\tdef\n" "abc" "def" +testing "comm unterminated line 2" "comm - input" "\tabc\n""def\n" "abc" "def" + +exit $FAILCOUNT |