summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-26 01:57:32 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-26 01:57:32 +0000
commit3d2b7c0797ff82f6c8d70b1951e64a3f83750c81 (patch)
treebf4e97e83165f2faa703920a5e54b46e89ef4f79
parent7fa0c70ef7c5ab2d3fbefbb429e1f1ba1de7971a (diff)
* test/ruby/test_extlibs.rb: test in separated process for mathn/*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_extlibs.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/ruby/test_extlibs.rb b/test/ruby/test_extlibs.rb
index 46573b8..5016692 100644
--- a/test/ruby/test_extlibs.rb
+++ b/test/ruby/test_extlibs.rb
@@ -1,10 +1,14 @@
+require "envutil"
+
class TestExtLibs < Test::Unit::TestCase
def self.check_existence(ext, add_msg = nil)
add_msg = ". #{add_msg}" if add_msg
- define_method("test_existence_of_#{ext.gsub(%r'/', '_')}") do
- assert_nothing_raised("extension library `#{ext}' is not found#{add_msg}") do
- require ext
- end
+ define_method("test_existence_of_#{ext}") do
+ assert_separately([], <<-"end;", ignore_stderr: true) # do
+ assert_nothing_raised("extension library `#{ext}' is not found#{add_msg}") do
+ require "#{ext}"
+ end
+ end;
end
end
@@ -32,8 +36,8 @@ class TestExtLibs < Test::Unit::TestCase
check_existence "io/nonblock"
check_existence "io/wait"
check_existence "json"
- #check_existence "mathn/complex" # break the world
- #check_existence "mathn/rational" # break the world
+ check_existence "mathn/complex"
+ check_existence "mathn/rational"
check_existence "nkf"
check_existence "objspace"
check_existence "openssl", "this may be false positive, but should assert because rubygems requires this"