Skip to content

Commit

Permalink
get rid of platform specific commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mixas committed Feb 28, 2018
1 parent 1c75e43 commit c4d0db7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions t/bin/ndproc-Pipe.t
Expand Up @@ -26,8 +26,8 @@ $test = "cmd_failed";
run_ok(
name => $test,
pre => sub { copy("_cfg.alpha.json", "$test.got") },
cmd => [ @cmd, '--path', '{files}', '--cmd', 'sh -c "exit 222"', "$test.got" ],
stderr => qr/ FATAL] 'sh -c "exit 222"' exited with 222\./,
cmd => [ @cmd, '--path', '{files}', '--cmd', $^X . ' -e "exit 222"', "$test.got" ],
stderr => qr/ FATAL] .* exited with 222\./,
exit => 16
);

Expand All @@ -44,31 +44,31 @@ $test = "path";
run_ok(
name => $test,
pre => sub { copy("_cfg.alpha.json", "$test.got") },
cmd => [ @cmd, '--path', '{files}', '--cmd', 'sed "s/1/42/g"', "$test.got" ],
cmd => [ @cmd, '--path', '{files}', '--cmd', $^X . ' -pe "s/1/42/g"', "$test.got" ],
test => sub { files_eq_or_diff("$test.exp", "$test.got", $test) },
);

$test = "path_absent";
run_ok(
name => $test,
pre => sub { copy("_cfg.alpha.json", "$test.got") },
cmd => [ @cmd, '--cmd', 'sed "s/[0-8]/9/g"', "$test.got" ],
cmd => [ @cmd, '--cmd', $^X . ' -pe "s/[0-8]/9/g"', "$test.got" ],
test => sub { files_eq_or_diff("$test.exp", "$test.got", $test) },
);

$test = "path_empty"; # means 'full structure'
run_ok(
name => $test,
pre => sub { copy("_cfg.alpha.json", "$test.got") },
cmd => [ @cmd, '--path', '', '--cmd', 'sed "s/[0-8]/9/g"', "$test.got" ],
cmd => [ @cmd, '--path', '', '--cmd', $^X . ' -pe "s/[0-8]/9/g"', "$test.got" ],
test => sub { files_eq_or_diff("$test.exp", "$test.got", $test) },
);

$test = "path_strict";
run_ok(
name => $test,
pre => sub { copy("_cfg.alpha.json", "$test.got") },
cmd => [ @cmd, '--strict', '--path', '{not_exists}', '--cmd', 'sed "s/[0-8]/9/g"', "$test.got" ],
cmd => [ @cmd, '--strict', '--path', '{not_exists}', '--cmd', $^X . ' -pe "s/[0-8]/9/g"', "$test.got" ],
stderr => qr/ FATAL] Failed to lookup path '\{not_exists\}'/,
exit => 4,
);
Expand All @@ -77,7 +77,7 @@ $test = "preserve";
run_ok(
name => $test,
pre => sub { copy("_cfg.alpha.json", "$test.got") },
cmd => [ @cmd, '--preserve', '{files}{"/etc/hosts"}', '--cmd', 'sed "s/[0-8]/9/g"', "$test.got" ],
cmd => [ @cmd, '--preserve', '{files}{"/etc/hosts"}', '--cmd', $^X . ' -pe "s/[0-8]/9/g"', "$test.got" ],
test => sub { files_eq_or_diff("$test.exp", "$test.got", $test) },
);

0 comments on commit c4d0db7

Please sign in to comment.