summaryrefslogtreecommitdiff
path: root/test/ruby/test_file_exhaustive.rb
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-16 06:03:13 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-16 06:03:13 +0000
commit201267b1c555a33adeb03d41d8748cb40562c0a8 (patch)
tree8724a8124f4f063f0b97eca7a090abaad22a973f /test/ruby/test_file_exhaustive.rb
parent4f98aa2bcfff913a112c56f190727213de9173af (diff)
* test/ruby/test_file_exhaustive.rb (TestFileExhaustive::test_expand_path):
ENV["HOME"] might not be set. On those cases without it an exception raises here, which effectively disables later tests on this method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_file_exhaustive.rb')
-rw-r--r--test/ruby/test_file_exhaustive.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 5a62db1124..1d45b97d9f 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -398,7 +398,7 @@ class TestFileExhaustive < Test::Unit::TestCase
assert_equal(@file, File.expand_path(@file + "::$DATA"))
assert_match(/\Ac:\//i, File.expand_path('c:'), '[ruby-core:31591]')
end
- assert_kind_of(String, File.expand_path("~"))
+ assert_kind_of(String, File.expand_path("~")) if ENV["HOME"]
assert_raise(ArgumentError) { File.expand_path("~foo_bar_baz_unknown_user_wahaha") }
assert_raise(ArgumentError) { File.expand_path("~foo_bar_baz_unknown_user_wahaha", "/") }
begin