xref: /freebsd/contrib/one-true-awk/testdir/Compare.drek (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1# an arbitrary collection of input data
2
3cat td.1 td.1 >foo.td
4sed 's/^........................//' td.1 >>foo.td
5pr -m td.1 td.1 td.1 >>foo.td
6pr -2 td.1 >>foo.td
7wc foo.td
8
9td=foo.td
10>footot
11
12for i in $*
13do
14	echo $i >/dev/tty
15	echo $i '<<<'
16	cd ..
17	echo testdir/$i:
18	ind <testdir/$i
19	a.out -f testdir/$i >drek.c
20	cat drek.c
21	make drek || ( echo $i '	' bad compile; echo $i '	' bad compile >/dev/tty; continue )
22	cd testdir
23
24	time /usr/bin/awk -f $i $td >foo2 2>foo2t
25	cat foo2t
26	time ../drek $td >foo1 2>foo1t
27	cat foo1t
28	cmp foo1 foo2 || ( echo $i '	' bad; echo $i '	' bad >/dev/tty; diff foo1 foo2 | sed 20q )
29	echo '>>>' $i
30	echo
31	echo $i: >>footot
32	cat foo1t foo2t >>footot
33done
34
35ctimes footot
36