7 Test evaluation of combination of C<-e> and C<-c> switches.
9 They should all do a syntax check and never evaluate the
15 '-ce "print qq,Code got interpreted!,"',
16 '-c -e "print qq,Code got interpreted!,"',
17 '-e "print qq,Code got interpreted!," -c',
23 if $*OS eq "browser" {
24 skip_rest "Programs running in browsers don't have access to regular IO.";
28 diag "Running under $*OS";
32 if $*OS eq any <MSWin32 mingw msys cygwin> {
36 sub nonce () { return (".{$*PID}." ~ (1..1000).pick) }
38 for @examples -> $ex {
39 my $out_fn = "temp-ex-output" ~ nonce;
40 my $command = "$*EXECUTABLE_NAME $ex $redir $out_fn";
44 my $expected = "-e syntax OK\n";
45 my $got = slurp $out_fn;
48 is $got, $expected, "$ex works";