Skip to content

Commit

Permalink
Fix r65926 test_dir.rb for windows (tilde)
Browse files Browse the repository at this point in the history
[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
  • Loading branch information
k0kubun committed Nov 24, 2018
1 parent b5a1a3a commit ba9a6f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/ruby/test_dir.rb
Expand Up @@ -377,8 +377,9 @@ def test_home
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|
Expand Down

0 comments on commit ba9a6f8

Please sign in to comment.