1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
shyouhei 2010-09-16 06:03:13 +00:00
parent 4f98aa2bcf
commit 201267b1c5
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,10 @@
Thu Sep 16 14:50:42 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
* 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.
Thu Sep 16 08:30:28 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu Sep 16 08:30:28 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* sprintf.c (rb_f_sprintf): fix rdoc. pointed out by Tomoyuki * sprintf.c (rb_f_sprintf): fix rdoc. pointed out by Tomoyuki

View file

@ -398,7 +398,7 @@ class TestFileExhaustive < Test::Unit::TestCase
assert_equal(@file, File.expand_path(@file + "::$DATA")) assert_equal(@file, File.expand_path(@file + "::$DATA"))
assert_match(/\Ac:\//i, File.expand_path('c:'), '[ruby-core:31591]') assert_match(/\Ac:\//i, File.expand_path('c:'), '[ruby-core:31591]')
end 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") }
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 begin