Skip to content

Commit

Permalink
.absolute on paths starting with - does not produce empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Sep 9, 2016
1 parent 71aab20 commit 7428736
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion S32-io/io-path-cygwin.t
Expand Up @@ -2,7 +2,7 @@ use v6;
use Test;
# L<S32::IO/IO::Path>

plan 51;
plan 52;

# Make sure we have a controlled environment
my $*SPEC = IO::Spec::Cygwin;
Expand Down Expand Up @@ -82,3 +82,7 @@ is $numfile.succ.succ, "foo/file03.txt", "succ x 2";
is $numfile.pred, "foo/file00.txt", "pred basic";
is IO::Path::Unix.new("foo/()").succ, "foo/()", "succ only effects basename";
is IO::Path::Unix.new("foo/()").succ, "foo/()", "pred only effects basename";

# RT#128840
isnt IO::Path::Cygwin.new('-a').absolute, '',
'.absolute on paths starting with `-` does not produce empty string';
6 changes: 5 additions & 1 deletion S32-io/io-path-unix.t
Expand Up @@ -2,7 +2,7 @@ use v6;
use Test;
# L<S32::IO/IO::Path>

plan 36;
plan 37;

# make sure we have a controlled environment here
my $*SPEC = IO::Spec::Unix;
Expand Down Expand Up @@ -66,3 +66,7 @@ is $numfile.succ.succ, "foo/file03.txt", "succ x 2";
is $numfile.pred, "foo/file00.txt", "pred basic";
is IO::Path::Unix.new("foo/()").succ, "foo/()", "succ only effects basename";
is IO::Path::Unix.new("foo/()").succ, "foo/()", "pred only effects basename";

# RT#128840
isnt IO::Path::Unix.new("-a").absolute, '',
'.absolute on paths starting with `-` does not produce empty string';
6 changes: 5 additions & 1 deletion S32-io/io-path-win.t
Expand Up @@ -2,7 +2,7 @@ use v6;
use Test;
# L<S32::IO/IO::Path>

plan 50;
plan 51;

my $*SPEC = IO::Spec::Win32; # .IO needs to have IO::Spec::Win32
my $*CWD = 'C:\\zip\\loc'.IO;
Expand Down Expand Up @@ -81,3 +81,7 @@ is $numfile.succ.succ, "foo\\file03.txt", "succ x 2";
is $numfile.pred, "foo\\file00.txt", "pred basic";
is IO::Path::Win32.new("foo\\()").succ, "foo\\()", "succ only effects basename";
is IO::Path::Win32.new("foo\\()").succ, "foo\\()", "pred only effects basename";

# RT#128840
isnt IO::Path::Win32.new('-a').absolute, '',
'.absolute on paths starting with `-` does not produce empty string';

0 comments on commit 7428736

Please sign in to comment.