diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-06 04:30:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-06 04:30:15 +0000 |
commit | f86f669cf3242fe825c9b12a4e7b50769f822113 (patch) | |
tree | 478a201ed043db816c0128f08fd181f5a1149b4d /test/mkmf | |
parent | a032b1bdb868f4239fb209ef3006fe843c3ada74 (diff) | |
download | ruby-f86f669cf3242fe825c9b12a4e7b50769f822113.tar.gz |
* test/mkmf/base.rb (TestMkmf): was turned into a class, because
MiniUnit doesn't complain even if a testcase has no tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/mkmf')
-rw-r--r-- | test/mkmf/base.rb | 9 | ||||
-rw-r--r-- | test/mkmf/test_sizeof.rb | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/test/mkmf/base.rb b/test/mkmf/base.rb index b4cf4884fa..0a75744721 100644 --- a/test/mkmf/base.rb +++ b/test/mkmf/base.rb @@ -9,15 +9,22 @@ RbConfig::CONFIG["cppflags"] << " -I." CONFIG["cppflags"] << " -I." $extout_prefix = "$(extout)$(target_prefix)/" -module TestMkmf +class TestMkmf < Test::Unit::TestCase def setup @tmpdir = Dir.mktmpdir @curdir = Dir.pwd @mkmfobj = Object.new Dir.chdir(@tmpdir) + class << (@output = "") + def flush; end + def reopen(*) end + alias write << + end + $stdout = @output end def teardown + $stdout = STDOUT Dir.chdir(@curdir) FileUtils.rm_rf(@tmpdir) end diff --git a/test/mkmf/test_sizeof.rb b/test/mkmf/test_sizeof.rb index 29a5253418..e1c498dc0a 100644 --- a/test/mkmf/test_sizeof.rb +++ b/test/mkmf/test_sizeof.rb @@ -1,9 +1,7 @@ require_relative 'base' -module TestMkmf - class TestSizeof < Test::Unit::TestCase - include TestMkmf - +class TestMkmf + class TestSizeof < TestMkmf def test_sizeof open("confdefs.h", "w") {|f| f.puts "typedef struct {char x;} test1_t;" |