@@ -9,20 +9,21 @@ ok(nqp::ishash($a),'nqp::getenvhash() returns a hash');
9
9
ok ($ a <foo > == 123 ,' nqp::getenvhash() is a fresh hash' );
10
10
ok ($ b <foo > == 456 ,' nqp::getenvhash() is a fresh hash' );
11
11
12
- my $ tmp_file := " tmp" ;
13
- nqp :: shell (" echo Hello > $ tmp_file " ,nqp ::cwd(),nqp ::getenvhash());
14
- my $ output := slurp ($ tmp_file );
12
+ my $ tmp-file := " tmp" ;
13
+ nqp :: shell (" echo Hello > $ tmp-file " ,nqp ::cwd(),nqp ::getenvhash());
14
+ my $ output := slurp ($ tmp-file );
15
15
ok ($ output ~~ /^ Hello /,' nqp::shell works with the echo shell command' );
16
16
17
17
my $ env := nqp ::getenvhash();
18
18
$ env <NQP_SHELL_TEST_ENV_VAR > := " 123foo" ;
19
19
20
- nqp :: shell (" echo % NQP_SHELL_TEST_ENV_VAR % > $ tmp_file " ,nqp ::cwd(),$ env );
21
- $ output := slurp ($ tmp_file );
20
+ nqp :: shell (" echo % NQP_SHELL_TEST_ENV_VAR % > $ tmp-file " ,nqp ::cwd(),$ env );
21
+ $ output := slurp ($ tmp-file );
22
22
if $ output eq " % NQP_SHELL_TEST_ENV_VAR %\n " {
23
- nqp :: shell (" echo \$NQP_SHELL_TEST_ENV_VAR > $ tmp_file " ,nqp ::cwd(),$ env );
24
- my $ output := slurp ($ tmp_file );
23
+ nqp :: shell (" echo \$NQP_SHELL_TEST_ENV_VAR > $ tmp-file " ,nqp ::cwd(),$ env );
24
+ my $ output := slurp ($ tmp-file );
25
25
ok ($ output eq " 123foo\n " ," passing env variables to child processes works linux" );
26
26
} else {
27
27
ok ($ output ~~ /^ 123foo /," passing env variables to child processes works on windows" );
28
28
}
29
+ nqp :: unlink ($ tmp-file );
0 commit comments