Skip to content

Commit

Permalink
Allow "t/fudgeandrun <section>/<file>.t"
Browse files Browse the repository at this point in the history
We refer to spec tests a lot without the full path of "t/spec/..." -
allow fudgeandrun to run a test either with the full path, or the
relative path from the top of the spec dir.
  • Loading branch information
coke committed Jan 3, 2012
1 parent c001b3f commit 6fe85ab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/fudgeandrun
Expand Up @@ -4,5 +4,15 @@ use warnings;

my @OPTS = ('--keep-exit-code', 'niecza');

if (@ARGV) {
my $file = $ARGV[0];
if (! -e $file) {
my $spec = "t/spec/$file";
if (-e $spec) {
$ARGV[0] = $spec;
}
}
}

my $nt = `t/spec/fudge @OPTS @ARGV`;
system("mono", "./run/Niecza.exe", split ' ', $nt);

0 comments on commit 6fe85ab

Please sign in to comment.