diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_tmpdir.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb index c48b4b7fb2..61d3f60213 100644 --- a/test/test_tmpdir.rb +++ b/test/test_tmpdir.rb @@ -18,4 +18,15 @@ class TestTmpdir < Test::Unit::TestCase end end end + + def test_no_homedir + bug7547 = '[ruby-core:50793]' + home, ENV["HOME"] = ENV["HOME"], nil + dir = assert_nothing_raised(bug7547) do + break Dir.mktmpdir("~") + end + assert_match(/\A~/, File.basename(dir), bug7547) + ensure + ENV["HOME"] = home + end end |