summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-06 02:17:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-06 02:17:23 +0000
commit5e9648be88dfbbb22f00f7c0ad2686c835bb467f (patch)
treeaf9bb28e56660c73bbd69a067ef308f55a7267e3 /test
parentf5c616f034d8d01ae2ef6c3f8c768876a3def673 (diff)
test_require.rb: shared drive
* test/ruby/test_require.rb (TestRequire#test_require_with_unc): cannot test unless the local drive is shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_require.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 7e6af70ff6..f6e75a8eaf 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -104,7 +104,13 @@ class TestRequire < Test::Unit::TestCase
end
def test_require_with_unc
- assert(system(File.expand_path(EnvUtil.rubybin).sub(/\A(\w):/, '//127.0.0.1/\1$/'), "-rabbrev", "-e0"))
+ ruby = File.expand_path(EnvUtil.rubybin).sub(/\A(\w):/, '//127.0.0.1/\1$/')
+ skip "local drive #$1: is not shared" unless File.exist?(ruby)
+ pid = nil
+ assert_nothing_raised {pid = spawn(ruby, "-rabbrev", "-e0")}
+ ret, status = Process.wait2(pid)
+ assert_equal(pid, ret)
+ assert_predicate(status, :success?)
end if /mswin|mingw/ =~ RUBY_PLATFORM
def test_require_twice