Permalink
Browse files

Replace system calls diff and rm

because not all systems have these commands
  • Loading branch information...
1 parent c676071 commit 0874b2c8e4063a2ce8d7c3baa791d876b26c7641 @perlpunk perlpunk committed May 19, 2017
Showing with 12 additions and 12 deletions.
  1. +1 −0 Meta
  2. +1 −10 test/TestInlineC.pm
  3. +10 −2 test/pegex-parser.t
View
1 Meta
@@ -32,6 +32,7 @@ requires:
Parse::RecDescent: 1.967009
Pegex: 0.58
ExtUtils::MakeMaker: 7.00
+ File::Path: 0
win32:
requires:
View
@@ -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);
}
View
@@ -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) {

0 comments on commit 0874b2c

Please sign in to comment.