aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathname
diff options
context:
space:
mode:
Diffstat (limited to 'test/pathname')
-rw-r--r--test/pathname/test_pathname.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 24f6bb942d..110b78283c 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -88,6 +88,10 @@ class TestPathname < Test::Unit::TestCase
defassert(:cleanpath_aggressive, '/', '///a/../..')
end
+ if DOSISH
+ defassert(:cleanpath_aggressive, 'c:/foo/bar', 'c:\\foo\\bar')
+ end
+
def cleanpath_conservative(path)
Pathname.new(path).cleanpath(true).to_s
end
@@ -124,6 +128,10 @@ class TestPathname < Test::Unit::TestCase
defassert(:cleanpath_conservative, '/a', '/../.././../a')
defassert(:cleanpath_conservative, 'a/b/../../../../c/../d', 'a/b/../../../../c/../d')
+ if DOSISH
+ defassert(:cleanpath_conservative, 'c:/foo/bar', 'c:\\foo\\bar')
+ end
+
if DOSISH_UNC
defassert(:cleanpath_conservative, '//', '//')
else