Skip to content

Commit

Permalink
#127591: Relax test a bit
Browse files Browse the repository at this point in the history
this tested against IO::Local, and the test never passed.
These days, IO::Local is gone, so the previously failing test now errors
out.

Instead, relax the test to check for IO::Path. And unfudge, because
it passes that way.
  • Loading branch information
moritz committed Feb 22, 2016
1 parent 527da4c commit 31fa3f9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions S32-io/dir.t
Expand Up @@ -9,12 +9,11 @@ my @files;
ok (@files = dir()), "dir() runs in cwd()";

# see roast's README as for why there is always a t/ available
#?niecza skip "Grepping Str against a list of IO::Local does not work"
#?niecza skip "Grepping Str against a list of IO::Path does not work"
#?rakudo todo 'directories are not marked with trailing / yet RT #124784'
ok @files>>.relative.grep('t/'), 'current directory contains a t/ dir';
ok @files.grep(*.basename eq 't'), 'current directory contains a t/ dir';
#?rakudo todo 'entries are still IO::Path RT #124785'
ok @files[0] ~~ IO::Local, 'dir() returns IO::Local';
ok @files[0] ~~ IO::Path, 'dir() returns IO::Path';
#?rakudo todo 'dirname is not yet absolute RT #124786'
is @files[0].dirname, $*CWD, 'dir() returns IO::Path object in the current directory';

Expand All @@ -23,7 +22,7 @@ nok @files>>.relative.grep('.'|'..'), '"." and ".." are not returned';
is +dir(:test).grep(*.basename eq '.'|'..'), 2, "... unless you override :test";
nok dir( test=> none('.', '..', 't') ).grep(*.basename eq 't'), "can exclude t/ dir";

# previous tests rewritten to not smartmatch against IO::Local.
# previous tests rewritten to not smartmatch against IO::Path.
# Niecza also seems to need the ~, alas.
nok @files.grep(*.basename eq '.'|'..'), '"." and ".." are not returned';
is +dir(:test).grep(*.basename eq '.'|'..'), 2, "... unless you override :test";
Expand Down

0 comments on commit 31fa3f9

Please sign in to comment.