test_require.rb: need verbose
* test/ruby/test_require.rb (test_race_exception): need $VERBOSE setting, to emit warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b753b9606e
commit
37fb998384
@ -400,6 +400,7 @@ class TestRequire < Test::Unit::TestCase
|
|||||||
bug5754 = '[ruby-core:41618]'
|
bug5754 = '[ruby-core:41618]'
|
||||||
path = nil
|
path = nil
|
||||||
stderr = $stderr
|
stderr = $stderr
|
||||||
|
verbose = $VERBOSE
|
||||||
Tempfile.create(%w"bug5754 .rb") {|tmp|
|
Tempfile.create(%w"bug5754 .rb") {|tmp|
|
||||||
path = tmp.path
|
path = tmp.path
|
||||||
tmp.print %{\
|
tmp.print %{\
|
||||||
@ -447,11 +448,14 @@ class TestRequire < Test::Unit::TestCase
|
|||||||
t1[:t] = t2
|
t1[:t] = t2
|
||||||
t2[:t] = t1
|
t2[:t] = t1
|
||||||
|
|
||||||
|
$VERBOSE = true
|
||||||
start = true
|
start = true
|
||||||
|
|
||||||
assert_nothing_raised(ThreadError, bug5754) {t1.join}
|
assert_nothing_raised(ThreadError, bug5754) {t1.join}
|
||||||
assert_nothing_raised(ThreadError, bug5754) {t2.join}
|
assert_nothing_raised(ThreadError, bug5754) {t2.join}
|
||||||
|
|
||||||
|
$VERBOSE = false
|
||||||
|
|
||||||
assert_equal(true, (t1_res ^ t2_res), bug5754 + " t1:#{t1_res} t2:#{t2_res}")
|
assert_equal(true, (t1_res ^ t2_res), bug5754 + " t1:#{t1_res} t2:#{t2_res}")
|
||||||
assert_equal([:pre, :post], scratch, bug5754)
|
assert_equal([:pre, :post], scratch, bug5754)
|
||||||
|
|
||||||
@ -459,6 +463,7 @@ class TestRequire < Test::Unit::TestCase
|
|||||||
assert_match(/in #{__method__}'$/o, output)
|
assert_match(/in #{__method__}'$/o, output)
|
||||||
}
|
}
|
||||||
ensure
|
ensure
|
||||||
|
$VERBOSE = verbose
|
||||||
$stderr = stderr
|
$stderr = stderr
|
||||||
$".delete(path)
|
$".delete(path)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user