aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_file.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-26 07:26:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-26 07:26:36 +0000
commit5212b7fb5206329151f52532e0818832186f0346 (patch)
tree1592961eaad50452efa2042a16d3ed8700161564 /test/ruby/test_file.rb
parent62bab7fc22ed4668fc2cca4b85965644046a1169 (diff)
downloadruby-5212b7fb5206329151f52532e0818832186f0346.tar.gz
file.c: fix for UNC
* file.c (realpath_rec): UNC prefix does not end with path separator, so new separator is needed after it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_file.rb')
-rw-r--r--test/ruby/test_file.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index b9c2210bdf..b0a6971e69 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -231,6 +231,14 @@ class TestFile < Test::Unit::TestCase
assert_equal(realdir, File.realdirpath(".", tst))
assert_equal(File.join(realdir, "foo"), File.realdirpath("foo", tst))
}
+ begin
+ result = File.realdirpath("bar", "//:/foo")
+ rescue SystemCallError
+ else
+ if result.start_with?("//")
+ assert_equal("//:/foo/bar", result)
+ end
+ end
end
def test_utime_with_minus_time_segv