mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix r65926 test_dir.rb for windows (tilde)
[Fix GH-2022] From: MSP-Greg <greg.mpls@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b5a1a3aa7c
commit
ba9a6f8934
1 changed files with 2 additions and 1 deletions
|
@ -377,8 +377,9 @@ class TestDir < Test::Unit::TestCase
|
|||
assert_equal(@nodir, Dir.home(""))
|
||||
end
|
||||
if user = ENV["USER"]
|
||||
tilde = windows? ? "~" : "~#{user}"
|
||||
assert_nothing_raised(ArgumentError) do
|
||||
assert_equal(File.expand_path("~#{user}"), Dir.home(user))
|
||||
assert_equal(File.expand_path(tilde), Dir.home(user))
|
||||
end
|
||||
end
|
||||
%W[no:such:user \u{7559 5b88}:\u{756a}].each do |user|
|
||||
|
|
Loading…
Add table
Reference in a new issue