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