diff options
Diffstat (limited to 'sample')
-rw-r--r-- | sample/test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index 7194e072b1..d0a364f17c 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1675,13 +1675,21 @@ case Dir.pwd when %r'\A\w:' test_ok(/\A\w:\/\z/ =~ File.expand_path(".", "/")) test_ok(/\A\w:\/a\z/ =~ File.expand_path("a", "/")) + dosish = true when %r'\A//' test_ok(%r'\A//[^/]+/[^/]+\z' =~ File.expand_path(".", "/")) test_ok(%r'\A//[^/]+/[^/]+/a\z' =~ File.expand_path(".", "/")) + dosish = true else test_ok(File.expand_path(".", "/") == "/") test_ok(File.expand_path("sub", "/") == "/sub") end +if dosish + test_ok(File.expand_path("/", "//machine/share/sub") == "//machine/share") + test_ok(File.expand_path("/dir", "//machine/share/sub") == "//machine/share/dir") + test_ok(File.expand_path("/", "z:/sub") == "z:/") + test_ok(File.expand_path("/dir", "z:/sub") == "z:/dir") +end test_ok(File.expand_path(".", "//") == "//") test_ok(File.expand_path("sub", "//") == "//sub") |