File: 11_newlines.t

package info (click to toggle)
libipc-system-simple-perl 1.30-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 256 kB
  • sloc: perl: 908; makefile: 4
file content (30 lines) | stat: -rw-r--r-- 703 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl -w
use strict;
use IPC::System::Simple qw(run capture);
use Config;
use Test::More tests => 6;

my $perl_path = $Config{perlpath};

if ($^O ne 'VMS') {
    $perl_path .= $Config{_exe}
        unless $perl_path =~ m/$Config{_exe}$/i;
}

eval { run( "$perl_path -e1" ) };
is($@, "", 'Run works with single arg');

eval { run( "$perl_path -e1\n" ) };
is($@, "", 'Run works with \\n');

eval { run( "$perl_path -e1\r\n") };
is($@, "", 'Run works with \r\n');

eval { capture( "$perl_path -e1" ) };
is($@, "", 'Run works with single arg');

eval { capture( "$perl_path -e1\n" ) };
is($@, "", 'Run works with \\n');

eval { capture( "$perl_path -e1\r\n") };
is($@, "", 'Run works with \r\n');