Skip to content

Commit

Permalink
[io grant] Test IO::Path.dir's absoluteness behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed May 13, 2017
1 parent 4682d96 commit 98917dc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S32-io/dir.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use lib 't/spec/packages';
use Test;
use Test::Util;

plan 15;
plan 16;

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

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

subtest "dir-created IO::Paths' absoluteness controlled by invocant" => {
plan 2;
my @files = '.'.IO.dir;
cmp-ok +@files, '==', +@files.grep({not .is-absolute}), 'relative invocant';

@files = '.'.IO.absolute.IO.dir;
cmp-ok +@files, '==', +@files.grep({ .is-absolute}), 'absolute invocant';
}

# vim: ft=perl6

0 comments on commit 98917dc

Please sign in to comment.