-
-
Save zoffixznet/1f3acbcde375d36ce1105fef018dd05b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use lib <t/spec/packages>; | |
use Test; | |
use Test::Util; | |
plan 1; | |
is_run 「 | |
$*IN = IO::Handle.new: :path('-'.IO); | |
$*OUT = IO::Handle.new: :path('-'.IO); | |
my $w = '-'.IO.open: :w; | |
my $r = '-'.IO.open; | |
$r.get.say; | |
$*IN.slurp(:close).say; | |
$w.put: 'meow $w'; | |
$*OUT.put: 'meow $*OUT'; | |
」, "foo\nbar\nber", { | |
:out{ "OUT".IO.spurt: $_; $_ eq "foo\nbar\nber\nmeow \$w\nmeow \$*OUT\n" }, | |
:err{ "ERR".IO.spurt: $_; $_ eq '' }, | |
:0status | |
}, 「can use unopened handle with path '-'.IO」; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment