Skip to content

Commit

Permalink
Test .DESTROY doesn't close standard handles
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Jul 17, 2017
1 parent f739f03 commit 9a85e42
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S32-io/open.t
Expand Up @@ -3,7 +3,7 @@ use lib <t/spec/packages>;
use Test;
use Test::Util;

plan 64;
plan 65;

my \PATH = 't-S32-io-open.tmp';
my \PATH-RX = rx/'t-S32-io-open.tmp'/;
Expand Down Expand Up @@ -435,4 +435,13 @@ subtest '.open with "-" as path can open closed $*IN/$*OUT' => {
}, can use unopened handle with path '-'.IO;
}

# RT #131755
subtest '.DESTROY does not close standard handles' => {
plan 3;
for $*IN, $*OUT, $*ERR {
.DESTROY;
is-deeply .opened, True, .perl;
}
}

# vim: ft=perl6

0 comments on commit 9a85e42

Please sign in to comment.