~vcs-imports/gawk/master

168 by Arnold D. Robbins
Add tests for next and exit to test suite.
1
#!/bin/sh
2
3
# next.sh --- test next invoked in various ways
4
5
if [ "$AWK" = "" ]
6
then
7
	echo $0: You must set AWK >&2
8
	exit 1
9
fi
10
11
# non-fatal 
12
$AWK '{next}' /dev/null
13
$AWK 'function f() { next}; {f()}' /dev/null
14
# fatal
15
$AWK 'function f() { next}; BEGIN{f()}'
16
$AWK 'function f() { next}; {f()}; END{f()}' /dev/null
17
$AWK 'function f() { next}; BEGINFILE{f()}'
18
$AWK 'function f() { next}; {f()}; ENDFILE{f()}' /dev/null
19
20
exit 0	# for make