3
0

awk.tests 818 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # awk tests.
  3. # Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
  4. # Licensed under GPL v2, see file LICENSE for details.
  5. . testing.sh
  6. # testing "description" "arguments" "result" "infile" "stdin"
  7. testing "awk -F case 0" "awk -F '[#]' '{ print NF }'" "" "" ""
  8. testing "awk -F case 1" "awk -F '[#]' '{ print NF }'" "0\n" "" "\n"
  9. testing "awk -F case 2" "awk -F '[#]' '{ print NF }'" "2\n" "" "#\n"
  10. testing "awk -F case 3" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#\n"
  11. testing "awk -F case 4" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#zz\n"
  12. testing "awk -F case 5" "awk -F '[#]' '{ print NF }'" "4\n" "" "#abc##zz\n"
  13. testing "awk -F case 6" "awk -F '[#]' '{ print NF }'" "4\n" "" "z#abc##zz\n"
  14. testing "awk -F case 7" "awk -F '[#]' '{ print NF }'" "5\n" "" "z##abc##zz\n"
  15. exit $FAILCOUNT