diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-25 15:15:18 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-25 15:15:18 +0000 |
commit | 6535bd5d3149a2bf477857e01a7917410fc0d431 (patch) | |
tree | b70e7d38a81e7e94cb693d5984a0cbc8a3c8f603 /test | |
parent | 835c0535e6916ca41940e11106f5184b68d37c34 (diff) | |
download | ruby-6535bd5d3149a2bf477857e01a7917410fc0d431.tar.gz |
* test/ruby/test_extlibs.rb: check existance of extension libraries
which not depend on outer libraries. (experimental)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_extlibs.rb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/ruby/test_extlibs.rb b/test/ruby/test_extlibs.rb new file mode 100644 index 0000000000..3b78a5aace --- /dev/null +++ b/test/ruby/test_extlibs.rb @@ -0,0 +1,52 @@ +class TestExtLibs < Test::Unit::TestCase + def self.check_existance(ext, add_msg = nil) + add_msg = ". #{add_msg}" if add_msg + define_method("test_existance_of_#{ext.gsub(%r'/', '_')}") do + assert_nothing_raised("extension library `#{ext}' is not found#{add_msg}") do + require ext + end + end + end + + def windows? + /mswin|mingw/ =~ RUBY_PLATFORM + end + + check_existance "bigdecimal" + check_existance "continuation" + check_existance "coverage" + #check_existance "curses" # depend on libcurses + check_existance "date" + #check_existance "dbm" # depend on libdbm + check_existance "digest" + check_existance "etc" + check_existance "fcntl" + check_existance "fiber" + check_existance "fiddle" + #check_existance "gdbm" # depend on libgdbm + check_existance "io/console" + check_existance "io/nonblock" + check_existance "io/wait" + check_existance "json" + check_existance "mathn" + check_existance "nkf" + check_existance "objspace" + check_existance "openssl", "this may be false positive, but should assert because rubygems requires this" + check_existance "pathname" + check_existance "psych" + check_existance "pty" unless windows? + check_existance "racc/cparse" + check_existance "rbconfig" + #check_existance "readline" # depend on libreadline + check_existance "ripper" + check_existance "sdbm" + check_existance "socket" + check_existance "stringio" + check_existance "strscan" + check_existance "syslog" unless windows? + check_existance "thread" + #check_existance "tk" # depend on Tcl/Tk + check_existance "Win32API" if windows? + check_existance "win32ole" if windows? + check_existance "zlib", "this may be false positive, but should assert because rubygems requires this" +end |