diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-26 07:24:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-26 07:24:59 +0000 |
commit | 62bab7fc22ed4668fc2cca4b85965644046a1169 (patch) | |
tree | b1327de90cd048b619ee800eab4bc97d65bf7fb1 /test/ruby/test_file.rb | |
parent | 9c3d8bb0f26762d6809501a38be773de685764f0 (diff) | |
download | ruby-62bab7fc22ed4668fc2cca4b85965644046a1169.tar.gz |
test/ruby/test_file.rb: fix for UNC
* test/ruby/test_file.rb (test_realpath, test_realdirpath): fix for
UNC enabled platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_file.rb')
-rw-r--r-- | test/ruby/test_file.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index f94e4336d7..b9c2210bdf 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -213,7 +213,7 @@ class TestFile < Test::Unit::TestCase def test_realpath Dir.mktmpdir('rubytest-realpath') {|tmpdir| realdir = File.realpath(tmpdir) - tst = realdir.sub(/#{Regexp.escape(File::SEPARATOR)}/, '\0\0\0') + tst = realdir + (File::SEPARATOR*3 + ".") assert_equal(realdir, File.realpath(tst)) assert_equal(realdir, File.realpath(".", tst)) if File::ALT_SEPARATOR @@ -226,7 +226,7 @@ class TestFile < Test::Unit::TestCase def test_realdirpath Dir.mktmpdir('rubytest-realdirpath') {|tmpdir| realdir = File.realpath(tmpdir) - tst = realdir.sub(/#{Regexp.escape(File::SEPARATOR)}/, '\0\0\0') + tst = realdir + (File::SEPARATOR*3 + ".") assert_equal(realdir, File.realdirpath(tst)) assert_equal(realdir, File.realdirpath(".", tst)) assert_equal(File.join(realdir, "foo"), File.realdirpath("foo", tst)) |