blob: 91657418dd52034e35685a4922f6d66af899d3fa [file] [log] [blame]
Denis Vlasenko960eca62007-07-18 18:33:18 +00001#!/bin/sh
2
3# awk tests.
4# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
5# Licensed under GPL v2, see file LICENSE for details.
6
7. testing.sh
8
9# testing "description" "arguments" "result" "infile" "stdin"
10
11testing "awk -F case 0" "awk -F '[#]' '{ print NF }'" "" "" ""
12testing "awk -F case 1" "awk -F '[#]' '{ print NF }'" "0\n" "" "\n"
13testing "awk -F case 2" "awk -F '[#]' '{ print NF }'" "2\n" "" "#\n"
14testing "awk -F case 3" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#\n"
15testing "awk -F case 4" "awk -F '[#]' '{ print NF }'" "3\n" "" "#abc#zz\n"
16testing "awk -F case 5" "awk -F '[#]' '{ print NF }'" "4\n" "" "#abc##zz\n"
17testing "awk -F case 6" "awk -F '[#]' '{ print NF }'" "4\n" "" "z#abc##zz\n"
18testing "awk -F case 7" "awk -F '[#]' '{ print NF }'" "5\n" "" "z##abc##zz\n"
19
20exit $FAILCOUNT