Skip to content

Commit

Permalink
add test for die() + Test.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
FROGGS committed Oct 27, 2015
1 parent 9c56e42 commit 2dfcd85
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S29-context/die.t
Expand Up @@ -2,7 +2,7 @@ use v6;
use Test;
use lib 't/spec/packages';
use Test::Util;
plan 16;
plan 17;

# L<S29/Context/=item die>

Expand Down Expand Up @@ -74,4 +74,13 @@ is_run( 'say "hello"; die "Nos morituri te salutant!\n"',
# (which is what we want). (Test primarily aimed at PIL2JS)
is 42-19, 23, "basic sanity";

# RT #125573
is_run( 'use Test; pass; die "uh-oh"',
{ status => sub { 0 != $^a },
out => rx/'ok 1 -'/,
err => rx/'uh-oh'/,
},
'die() in combination with Test.pm exists non-zero-ish' );


# vim: ft=perl6

0 comments on commit 2dfcd85

Please sign in to comment.