diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-07 02:59:04 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-07 02:59:04 +0000 |
commit | fca3c408a72cc11bb065bf253bfe00dde4f92b9e (patch) | |
tree | 6048f3883b25dcd3af954d524cd4f4b33e5a7c9f /test | |
parent | 0f24f944705a3899f57f4c36f0a74d9438a09359 (diff) | |
download | ruby-fca3c408a72cc11bb065bf253bfe00dde4f92b9e.tar.gz |
* test/ruby/test_require.rb (TestRequire#test_require_twice): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_require.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 58cf241db5..9286994e22 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -105,6 +105,19 @@ class TestRequire < Test::Unit::TestCase assert(system(File.expand_path(EnvUtil.rubybin).sub(/\A(\w):/, '//127.0.0.1/\1$/'), "-rabbrev", "-e0")) end if /mswin|mingw/ =~ RUBY_PLATFORM + def test_require_twice + Dir.mktmpdir do |tmp| + req = File.join(tmp, "very_long_file_name.rb") + File.write(req, "p :ok\n") + assert(File.exist?(req)) + req[/.rb$/i] = "" + assert_in_out_err(['--disable-gems'], <<-INPUT, %w(:ok), []) + require "#{req}" + require "#{req}" + INPUT + end + end + def test_define_class begin require "socket" |