Skip to content

Commit

Permalink
Test Proc.[Bool|Sink] accounts for signal
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Sep 5, 2019
1 parent 270dafd commit 618eefb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S29-os/system.t
Expand Up @@ -6,7 +6,7 @@ use Test::Util;
# L<S29/"OS"/"=item run">
# system is renamed to run, so link there.

plan 39;
plan 41;

my $res;

Expand Down Expand Up @@ -204,4 +204,14 @@ subtest 'Proc.pid is set correctly' => {
isnt $pid, $p.pid, ".pid property updates with shell's PID on failed shell()";
}

# https://github.com/rakudo/rakudo/issues/3149
{
my $proc = run $*EXECUTABLE, -e,
use NativeCall; sub strdup(int64) is native(Str) {*}; strdup(0);
throws-like { sink $proc },
X::Proc::Unsuccessful,
'Exit with a segfault makes the Proc throw in sink context';
nok $proc, 'Exit with a segfault makes the Proc false';
}

# vim: ft=perl6

0 comments on commit 618eefb

Please sign in to comment.