diff --git a/S32-io/io-path-cygwin.t b/S32-io/io-path-cygwin.t index 11760cf768..3576a69c9d 100644 --- a/S32-io/io-path-cygwin.t +++ b/S32-io/io-path-cygwin.t @@ -2,7 +2,7 @@ use v6; use Test; # L -plan 51; +plan 52; # Make sure we have a controlled environment my $*SPEC = IO::Spec::Cygwin; @@ -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'; diff --git a/S32-io/io-path-unix.t b/S32-io/io-path-unix.t index c02a258234..b3d9bc0470 100644 --- a/S32-io/io-path-unix.t +++ b/S32-io/io-path-unix.t @@ -2,7 +2,7 @@ use v6; use Test; # L -plan 36; +plan 37; # make sure we have a controlled environment here my $*SPEC = IO::Spec::Unix; @@ -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'; diff --git a/S32-io/io-path-win.t b/S32-io/io-path-win.t index 6eff5caaea..5ca604c4c1 100644 --- a/S32-io/io-path-win.t +++ b/S32-io/io-path-win.t @@ -2,7 +2,7 @@ use v6; use Test; # L -plan 50; +plan 51; my $*SPEC = IO::Spec::Win32; # .IO needs to have IO::Spec::Win32 my $*CWD = 'C:\\zip\\loc'.IO; @@ -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';