Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix tests on Win
  • Loading branch information
lizmat committed Oct 3, 2014
1 parent e5c5288 commit 1f3a867
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions S32-io/io-path-unix.t
Expand Up @@ -37,12 +37,16 @@ is $relpath.absolute("/usr"), "/usr/foo/bar",
"absolute path specified";
is IO::Path::Unix.new("/usr/bin").relative("/usr"), "bin",
"relative path specified";
is $relpath.absolute.IO.relative, "foo/bar",
"relative inverts absolute";
is $relpath.absolute("/foo").IO.relative("/foo"),
"foo/bar","absolute inverts relative";
#?rakudo 1 todo 'resolve NYI, needs nqp::readlink'
is $abspath.relative.IO.absolute.IO.resolve, "/foo/bar", "absolute inverts relative with resolve";

{
my $*SPEC = IO::Spec::Unix; # make sure we have Unix $*SPEC in here
is $relpath.absolute.IO.relative, "foo/bar",
"relative inverts absolute";
is $relpath.absolute("/foo").IO.relative("/foo"),
"foo/bar","absolute inverts relative";
#?rakudo 1 todo 'resolve NYI, needs nqp::readlink'
is $abspath.relative.IO.absolute.IO.resolve, "/foo/bar", "absolute inverts relative with resolve";
}

is IO::Path::Unix.new("foo/bar").parent, "foo", "parent of 'foo/bar' is 'foo'";
is IO::Path::Unix.new("foo").parent, ".", "parent of 'foo' is '.'";
Expand Down

0 comments on commit 1f3a867

Please sign in to comment.