12 print runperl( switches => ['-x'],
13 progfile => 'run/switchx.aux' );
16 print runperl( switches => ['-x./run'],
17 progfile => 'run/switchx2.aux',
22 # Test the error message for not found
23 like(runperl(switches => ['-x'], progfile => 'run/switchx3.aux', stderr => 1),
24 qr/^No Perl script found in input\r?\n\z/,
25 "Test the error message when -x can't find a #!perl line");
28 skip("These tests embed newlines in command line arguments, which isn't portable to $^O", 2)
29 if $^O eq 'MSWin32' or $^O eq 'VMS';
30 my @progs = ("die;\n", "#!perl\n", "warn;\n");
31 is(runperl(progs => \@progs, stderr => 1, non_portable => 1),
32 "Died at -e line 1.\n", 'Test program dies');
33 is(runperl(progs => \@progs, stderr => 1, non_portable => 1,
35 "No Perl script found in input\n", '-x and -e gives expected error');