Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unlink temporary file after having used it in tests
This prevents a dirty working directory after having run the test suite.
  • Loading branch information
Paul Cochrane committed Apr 13, 2015
1 parent 9aee14f commit 16df8ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions t/nqp/19-file-ops.t
Expand Up @@ -172,6 +172,7 @@ my $env := nqp::getenvhash();
$env<NQP_SHELL_TEST_ENV_VAR> := "123foo";
nqp::shell("echo %NQP_SHELL_TEST_ENV_VAR% > $tmp_file",nqp::cwd(),$env);
my $output := slurp($tmp_file);
nqp::unlink($tmp_file);
my $is-windows := $output ne "%NQP_SHELL_TEST_ENV_VAR%\n";

if $is-windows {
Expand Down
1 change: 1 addition & 0 deletions t/nqp/78-shell.t
Expand Up @@ -26,3 +26,4 @@ if $output eq "%NQP_SHELL_TEST_ENV_VAR%\n" {
} else {
ok($output ~~ /^123foo/,"passing env variables to child processes works on windows");
}
nqp::unlink($tmp_file);

0 comments on commit 16df8ce

Please sign in to comment.