8 ### construct a hash of test_filename => answer_libdir
11 my $answer_libdir = $_;
12 my ($exercise_num) = $answer_libdir =~ m!/(\d+)-!
13 or die "can't parse dir name '$answer_libdir'";
15 map {$_ => $answer_libdir}
16 glob "$FindBin::RealBin/../t/$exercise_num-*.t";
18 # filter to find just answer libdirs
19 grep m!/\d+-[\w-]+/$!,
20 # list all dirs below this t/ dir
21 glob "$FindBin::RealBin/*/";
25 my $harness = TAP::Harness->new({
28 my ($h,$testfile) = @_;
29 my $ans_libdir = $test2anslib{$testfile} or die "test file $testfile not found??";
30 [$^X, "-I$ans_libdir", $testfile ]
34 chdir "$FindBin::RealBin/../";
35 $harness->runtests( sort keys %test2anslib );