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.

22 lines
367B

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