#!/bin/csh

# This script will run all tests in The Text Directory.

set TESTS = "ScrollText1 ScrollText2 ScrollText3 Text1 Text2 Text3 Text4 Text5 Text6 Text7 Text8 Text9 Text10 Text11 TextField1 TextField2 TextField3 TextField4"

if (-e ./failures) then
	echo "backing up failures file"
	mv failures failures.bak
endif

rm -f core
touch ./failures

foreach test ($TESTS)
	./$test
	if ($status != 0) then
		if (-e core) then
			echo "backing up core to "$test".core"
			mv core $test.core
		endif
		echo "failure in test: "$test
		echo $test >> failures
	endif
	
end
