xref: /freebsd/contrib/one-true-awk/testdir/Compare.p (revision 23f24377b1a9ab6677f00f2302484d6658d94cab)
1*23f24377SWarner Losh
2*23f24377SWarner Losholdawk=${oldawk-awk}
3*23f24377SWarner Loshawk=${awk-../a.out}
4*23f24377SWarner Losh
5*23f24377SWarner Loshecho oldawk=$oldawk, awk=$awk
6*23f24377SWarner Losh
7*23f24377SWarner Loshfor i
8*23f24377SWarner Loshdo
9*23f24377SWarner Losh	echo "$i:"
10*23f24377SWarner Losh	$oldawk -f $i test.countries test.countries >foo1
11*23f24377SWarner Losh	$awk -f $i test.countries test.countries >foo2
12*23f24377SWarner Losh	if cmp -s foo1 foo2
13*23f24377SWarner Losh	then true
14*23f24377SWarner Losh	else echo -n "$i:	BAD ..."
15*23f24377SWarner Losh	fi
16*23f24377SWarner Losh	diff -b foo1 foo2 | sed -e 's/^/	/' -e 10q
17*23f24377SWarner Loshdone
18