Skip to content

Commit

Permalink
Add some tests for dirty dir specififications
Browse files Browse the repository at this point in the history
Easily expandable should anyone feel the need
  • Loading branch information
lizmat committed Jun 18, 2020
1 parent b2ee3e0 commit cfe16b9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S32-io/dir.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add("packages/Test-Helpers");
use Test::Util;

plan 17;
plan 18;

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

Expand Down Expand Up @@ -77,4 +77,16 @@ subtest '.dir with relative paths sets right CWD' => {
"make sure dir / produces absolute paths";
}

subtest "checky dirty dir specifications" => {
for (
"///", "/",
"./.", ".",
# add more here if you feel the need
) -> $dirty, $clean {
is-deeply dir($dirty), dir($clean),
"does dir '$dirty' produce the same as dir '$clean'";
}
done-testing;
}

# vim: expandtab shiftwidth=4

0 comments on commit cfe16b9

Please sign in to comment.