File: subprocess.t

package info (click to toggle)
libdevel-cover-perl 1.51-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,036 kB
  • sloc: perl: 10,861; sh: 687; makefile: 7
file content (18 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;

use Test::More;

if ($] < 5.010000) {
    plan skip_all => "Perl version $] is not supported";
} else {
    plan tests => 2;
}

my $cmd = qq[$^X -e "print q(Hello, world.)"];
my $output = `$cmd 2>&1`;
is($output, "Hello, world.", "simple test with perl -e");

$cmd = qq[$^X -Mblib -MDevel::Cover=-silent,1 -e "print q(Hello, world.)"];
$output = `$cmd 2>&1`;
is($output, "Hello, world.", "test with perl -MDevel::Cover,-silent,1 -e");