Skip to content

Commit 98917dc

Browse files
committed
[io grant] Test IO::Path.dir's absoluteness behaviour
Per impl in rakudo/rakudo@aa72bdefe4
1 parent 4682d96 commit 98917dc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

S32-io/dir.t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use lib 't/spec/packages';
33
use Test;
44
use Test::Util;
55

6-
plan 15;
6+
plan 16;
77

88
# L<S32::IO/Functions/"=item dir">
99

@@ -60,4 +60,13 @@ is_run 'dir | say', {
6060
$tested or flunk 'expected a dir $*CWD test but it never ran';
6161
}
6262

63+
subtest "dir-created IO::Paths' absoluteness controlled by invocant" => {
64+
plan 2;
65+
my @files = '.'.IO.dir;
66+
cmp-ok +@files, '==', +@files.grep({not .is-absolute}), 'relative invocant';
67+
68+
@files = '.'.IO.absolute.IO.dir;
69+
cmp-ok +@files, '==', +@files.grep({ .is-absolute}), 'absolute invocant';
70+
}
71+
6372
# vim: ft=perl6

0 commit comments

Comments
 (0)