mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
9c3d8bb0f2
commit
62bab7fc22
1 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue