Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zzz-spec.t fails on Windows if "A:" drive is in use #217

Open
xdg opened this issue Aug 30, 2018 · 1 comment
Open

zzz-spec.t fails on Windows if "A:" drive is in use #217

xdg opened this issue Aug 30, 2018 · 1 comment
Labels

Comments

@xdg
Copy link
Contributor

xdg commented Aug 30, 2018

No description provided.

@xdg
Copy link
Contributor Author

xdg commented Aug 30, 2018

Possible workaround:

diff --git a/t/zzz-spec.t b/t/zzz-spec.t
index 2452159..da2b8d5 100644
--- a/t/zzz-spec.t
+++ b/t/zzz-spec.t
@@ -80,20 +80,13 @@ if ($IS_WIN32) {
         [ "path('\\d1','\\d2')",     '/d1/d2' ],
         [ "path('\\d1','\\d2\\')",   '/d1/d2' ],
         [ "path('d1','d2','d3')",    'd1/d2/d3' ],
-        [ "path('A:/d1','d2','d3')", 'A:/d1/d2/d3' ],
-        [ "path('A:/')",             'A:/' ],
         [ "path('\\', 'foo')",       '/foo' ],
-        [ "path('A:', 'foo')",       'A:/foo' ],
         [ "path('a','b','c')",       'a/b/c' ],
         [ "path('a','b','.\\c')",    'a/b/c' ],
         [ "path('.\\a','b','c')",    'a/b/c' ],
         [ "path('c')",               'c' ],
         [ "path('.\\c')",            'c' ],
         [ "path('a/..','../b')",     '../b' ],
-        [ "path('A:', 'foo')",       'A:/foo' ],
-        [ "path('a:/')",             'A:/' ],
-        [ "path('A:f')",             'A:/f' ],
-        [ "path('A:/')",             'A:/' ],
         [ "path('a\\..\\..\\b\\c')", '../b/c' ],
         [ "path('//a\\b//c')",       '//a/b/c' ],
         [ "path('/a/..../c')",       '/a/..../c' ],
@@ -121,6 +114,17 @@ if ($IS_WIN32) {
         [ "path('//server/share')",      '//server/share/' ],
         [ "path('//d1','d2')",           '//d1/d2/' ],
     );
+    # These test require no "A:" drive mapped
+    if ( Cwd::getdcwd("A:") eq '' ) {
+        push @win32_tests,
+          [ "path('A:/d1','d2','d3')", 'A:/d1/d2/d3' ],
+          [ "path('A:/')",             'A:/' ],
+          [ "path('A:', 'foo')",       'A:/foo' ],
+          [ "path('A:', 'foo')",       'A:/foo' ],
+          [ "path('A:f')",             'A:/f' ],
+          [ "path('A:/')",             'A:/' ],
+          [ "path('a:/')",             'A:/' ],;
+    }
 }
 
 # XXX not sure how to adapt this sanely for use with Path::Tiny testing, so

@xdg xdg added the bug label Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant