File: 30-exit.t

package info (click to toggle)
libsystem-command-perl 1.122-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 228 kB
  • sloc: perl: 550; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 325 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
use Test::More;
use strict;
use warnings;
use System::Command;

# Adapted from https://github.com/book/System-Command/issues/27
my $quote = q|'|;
`$^X -Ilib -MSystem::Command -e $quote
    my \$out = System::Command->new(qw($^X -e1))->stdout;
    exit 3;
$quote`;
is( $? >> 8, 3, "exit status not clobbered" );
done_testing;