creaturesImage work: add mutableCopy and tint methods to the base class (and change...
[openc2e.git] / unittest.pl
blob0c9a29b71773538d06ef92760b7ae81ec179139d
1 #!/usr/bin/perl
2 # unit testing for caos script, fuzzie, 06/06/04
4 open(TESTS, './openc2e unittests/ 2>> /dev/null|');
6 $pass = 0; $fail = 0;
7 while (<TESTS>) {
8 if (/^PASS$/) { $pass++; next; }
9 if (/^FAIL$/) { $fail++; next; }
10 if (/^TEST: /) {
11 $oldtest = $test;
12 $test = $_;
13 $test =~ s/\n//;
14 $test =~ s/TEST: //;
15 next if ($pass == 0) && ($fail == 0);
16 print "test $oldtest: $pass passed, $fail failed\n";
17 $pass = 0; $fail = 0;
18 next;
20 # print $_;
22 if (($pass != 0) || ($fail != 0)) {
23 print "test $test: $pass passed, $fail failed\n";
25 close TESTS;
26 # vim: set noet: