Commit | Line | Data |
---|---|---|
9f39aa08 | 1 | #!/usr/bin/perl |
2 | ||
9b9f6a8b | 3 | use strict; |
4 | use warnings; | |
9f39aa08 | 5 | |
9b9f6a8b | 6 | use FindBin; |
7 | use TAP::Harness; | |
8 | ||
9 | ||
9f39aa08 | 10 | my $harness = TAP::Harness->new( |
11 | { | |
12 | failures => 1, | |
13 | exec => sub { | |
14 | my ( undef, $testfile ) = @_; | |
9b9f6a8b | 15 | |
9f39aa08 | 16 | my ($number) = $testfile =~ m{^t/(\d+)}; |
9b9f6a8b | 17 | |
9f39aa08 | 18 | return [ $^X, $testfile ] if $number eq '00'; |
9b9f6a8b | 19 | |
9f39aa08 | 20 | my ($libdir) = glob "answers/$number-*" |
21 | or die "Cannot find an answer dir for $testfile"; | |
9b9f6a8b | 22 | |
9f39aa08 | 23 | [ $^X, "-I$libdir", $testfile ]; |
24 | }, | |
25 | } | |
26 | ); | |
9b9f6a8b | 27 | |
28 | chdir "$FindBin::RealBin/../"; | |
9f39aa08 | 29 | $harness->runtests( sort glob 't/*.t' ); |