|
Packit |
164714 |
#!/usr/bin/perl -w
|
|
Packit |
164714 |
use strict;
|
|
Packit |
164714 |
use IPC::System::Simple qw(run capture);
|
|
Packit |
164714 |
use Config;
|
|
Packit |
164714 |
use Test::More tests => 6;
|
|
Packit |
164714 |
|
|
Packit |
164714 |
my $perl_path = $Config{perlpath};
|
|
Packit |
164714 |
|
|
Packit |
164714 |
if ($^O ne 'VMS') {
|
|
Packit |
164714 |
$perl_path .= $Config{_exe}
|
|
Packit |
164714 |
unless $perl_path =~ m/$Config{_exe}$/i;
|
|
Packit |
164714 |
}
|
|
Packit |
164714 |
|
|
Packit |
164714 |
eval { run( "$perl_path -e1" ) };
|
|
Packit |
164714 |
is($@, "", 'Run works with single arg');
|
|
Packit |
164714 |
|
|
Packit |
164714 |
eval { run( "$perl_path -e1\n" ) };
|
|
Packit |
164714 |
is($@, "", 'Run works with \\n');
|
|
Packit |
164714 |
|
|
Packit |
164714 |
eval { run( "$perl_path -e1\r\n") };
|
|
Packit |
164714 |
is($@, "", 'Run works with \r\n');
|
|
Packit |
164714 |
|
|
Packit |
164714 |
eval { capture( "$perl_path -e1" ) };
|
|
Packit |
164714 |
is($@, "", 'Run works with single arg');
|
|
Packit |
164714 |
|
|
Packit |
164714 |
eval { capture( "$perl_path -e1\n" ) };
|
|
Packit |
164714 |
is($@, "", 'Run works with \\n');
|
|
Packit |
164714 |
|
|
Packit |
164714 |
eval { capture( "$perl_path -e1\r\n") };
|
|
Packit |
164714 |
is($@, "", 'Run works with \r\n');
|