xref: /freebsd/contrib/one-true-awk/bugs-fixed/REGRESS (revision 1023317ac491090f8d84a62999ffc303cf88528c)
1f32a6403SWarner Losh#! /bin/sh
223f24377SWarner Losh
323f24377SWarner Loshif [ ! -f ../a.out ]
423f24377SWarner Loshthen
523f24377SWarner Losh	echo Making executable
623f24377SWarner Losh	(cd .. ; make) || exit 0
723f24377SWarner Loshfi
823f24377SWarner Losh
923f24377SWarner Loshfor i in *.awk
1023f24377SWarner Loshdo
1123f24377SWarner Losh	echo === $i
1223f24377SWarner Losh	OUT=${i%.awk}.OUT
1323f24377SWarner Losh	OK=${i%.awk}.ok
14f32a6403SWarner Losh	OK2=${i%.awk}.ok2
1523f24377SWarner Losh	IN=${i%.awk}.in
1623f24377SWarner Losh	input=
1723f24377SWarner Losh	if [ -f $IN ]
1823f24377SWarner Losh	then
1923f24377SWarner Losh		input=$IN
2023f24377SWarner Losh	fi
2123f24377SWarner Losh
2223f24377SWarner Losh	../a.out -f $i $input > $OUT 2>&1
2323f24377SWarner Losh	if cmp -s $OK $OUT
2423f24377SWarner Losh	then
2523f24377SWarner Losh		rm -f $OUT
26f32a6403SWarner Losh	elif [ -f $OK2 ] && cmp -s $OK2 $OUT
27f32a6403SWarner Losh	then
28f32a6403SWarner Losh		rm -f $OUT
2923f24377SWarner Losh	else
30*1023317aSWarner Losh		echo "+++ $i failed!"
3123f24377SWarner Losh	fi
3223f24377SWarner Loshdone
33