xref: /freebsd/contrib/one-true-awk/testdir/T.lilly (revision 19fae0f66023a97a9b464b3beeeabb2081f575b3)
1echo T.lilly: miscellaneous RE tests from Bruce Lilly
2
3awk=${awk-../a.out}
4
5rm -f foo
6awk '
7/./ {
8	print $0 >"foo"
9	close("foo")
10	print "###", NR, $0
11	system("awk -f foo <\"lilly.ifile\" ")
12}' <lilly.progs >foo1 2>&1
13
14rm -f foo
15$awk '
16/./ {
17	print $0 >"foo"
18	close("foo")
19	print "###", NR, $0
20	system("../a.out -f foo <\"lilly.ifile\" ")
21}' <lilly.progs >foo2 2>&1
22
23echo `cat lilly.progs | wc -l` tests
24
25sed -e 's/awk://' -e 's/Syntax/syntax/' -e '/warning:/d' foo1 >glop1
26sed 's/..\/a.out://' foo2 >glop2
27diff glop1 glop2 >lilly.diff || echo 'bad: T.lilly is different'
28echo
29