Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change use of qx// to run() in test
  • Loading branch information
lucasbuchala committed Jul 6, 2015
1 parent c24974b commit 557532a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions S24-testing/line-numbers.t
Expand Up @@ -7,13 +7,10 @@ my $dir = 't/spec/S24-testing/test-data/';
my $prefix = 'line-number-';
my $suffix = '.txt';

my $cmd;
my $full-path;

sub execute-test ( :$function, :$line ) {
$full-path = $dir ~ $prefix ~ $function ~ $suffix;
$cmd = "$*EXECUTABLE $full-path 2>&1";
ok qqx[$cmd] ~~ /'Failed test ' (\N* \n \N*)? 'at ' $full-path ' line ' $line/,
my $full-path = $dir ~ $prefix ~ $function ~ $suffix;
my $proc = run($*EXECUTABLE, $full-path, :!out, :err);
ok $proc.err.slurp-rest ~~ /'Failed test ' (\N* \n \N*)? 'at ' $full-path ' line ' $line/,
"failing test with $function reports correct line number $line";
}

Expand Down

0 comments on commit 557532a

Please sign in to comment.