#!/bin/csh

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

set TESTS = "MainWin1 MainWin2 ScrollWin1 ScrollWin2 ScrollWin3 ScrollWin4 ScrollWin5"

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
