-
-
Save zoffixznet/3320ed4897ffa9b651775fc961f4d43d 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.d.PREVIEW; | |
use lib <t/spec/packages/>; | |
use Test; | |
use Test::Util; | |
subtest '.open with "-" as path in 6.d lang is no longer special' => { | |
plan 3; | |
indir make-temp-dir, { | |
(my $fh will leave {.close} = open '-', :w).spurt: 'foo'; | |
is-deeply open('-').slurp, 'foo', '&open(Str)'; | |
} | |
indir make-temp-dir, { | |
(my $fh will leave {.close} = open '-'.IO, :w).spurt: 'foo'; | |
is-deeply open('-'.IO).slurp, 'foo', '&open(Str)'; | |
} | |
indir make-temp-dir, { | |
(my $fh will leave {.close} = '-'.IO.open: :w).spurt: 'foo'; | |
is-deeply '-'.IO.open.slurp, 'foo', 'IO::Path.open'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment