Research portable Memory game | Исследовать портируемую игру Память
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
437B

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. my @tests;
  5. for (glob "test*[0-9].exe") {
  6. push @tests, "$_" if -e substr($_, 0, - 4).".ans";
  7. }
  8. my $num_failed=0;
  9. for my $test (@tests) {
  10. `./$test > $test.out`;
  11. my $ansfile = substr($test, 0, - 4).".ans";
  12. `diff $test.out $ansfile`;
  13. print "$test failed\n" if $?;
  14. $num_failed++ if $?;
  15. }
  16. print scalar @tests . " tests conducted, $num_failed failed.\n";
  17. exit $num_failed;