Skip to content

Commit

Permalink
Make test/pegex-parser.t less fragile on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Nov 17, 2014
1 parent 1788997 commit 41e13f8
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions test/pegex-parser.t
Expand Up @@ -13,7 +13,7 @@ SV* JAxH(char* x) {
}
END

is JAxH('Inline'), "Just Another Inline Hacker";
is JAxH('Inline'), "Just Another Inline Hacker", 'initial Inline code parsed';

my $got = Dump($main::data);
my $want = <<'...';
Expand All @@ -31,13 +31,10 @@ functions:
- JAxH
...

if ($got eq $want) {
pass 'parse worked';
}
else {
fail 'parse failed. (see diff)';
io('want')->print($want);
io('got')->print($got);
system('diff -u want got');
system('rm want got');
}
is $got, $want, 'parse worked';

# left in comments per ingy wish
# io('want')->print($want);
# io('got')->print($got);
# system('diff -u want got');
# system('rm want got');

0 comments on commit 41e13f8

Please sign in to comment.