mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
a032b1bdb8
commit
f86f669cf3
2 changed files with 10 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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;"
|
||||
|
|
Loading…
Add table
Reference in a new issue