Skip to content

Commit

Permalink
Replace system calls diff and rm
Browse files Browse the repository at this point in the history
because not all systems have these commands
  • Loading branch information
perlpunk committed May 19, 2017
1 parent c676071 commit 0874b2c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions Meta
Expand Up @@ -32,6 +32,7 @@ requires:
Parse::RecDescent: 1.967009
Pegex: 0.58
ExtUtils::MakeMaker: 7.00
File::Path: 0

win32:
requires:
Expand Down
11 changes: 1 addition & 10 deletions test/TestInlineC.pm
Expand Up @@ -39,16 +39,7 @@ sub test {
${ caller . '::TODO' };
};

if ($pegex_dump eq $prd_dump) {
Test::More::pass $label;
}
else {
Test::More::fail $label;
io->file('got')->print($pegex_dump);
io->file('want')->print($prd_dump);
Test::More::diag(`diff -u want got`);
unlink('want', 'got');
}
Test::More::cmp_ok($pegex_dump, 'eq', $prd_dump, $label);

($prd_data, $pegex_data);
}
Expand Down
12 changes: 10 additions & 2 deletions test/pegex-parser.t
Expand Up @@ -7,9 +7,17 @@ plan tests => 2;

use IO::All;
use YAML::XS;
use File::Path qw/ rmtree /;

sub remove_inline_dirs {
for $dir (glob "_Inline*") {
rmtree $dir;
}
}

BEGIN { remove_inline_dirs() }
END { remove_inline_dirs() }

BEGIN { system "rm -fr _Inline*" }
END { system "rm -fr _Inline*" }

use Inline C => <<'END', USING => '::Parser::Pegex';
SV* JAxH(char* x) {
Expand Down

0 comments on commit 0874b2c

Please sign in to comment.