mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 5 additions and 0 deletions
|
@ -400,6 +400,7 @@ class TestRequire < Test::Unit::TestCase
|
|||
bug5754 = '[ruby-core:41618]'
|
||||
path = nil
|
||||
stderr = $stderr
|
||||
verbose = $VERBOSE
|
||||
Tempfile.create(%w"bug5754 .rb") {|tmp|
|
||||
path = tmp.path
|
||||
tmp.print %{\
|
||||
|
@ -447,11 +448,14 @@ class TestRequire < Test::Unit::TestCase
|
|||
t1[:t] = t2
|
||||
t2[:t] = t1
|
||||
|
||||
$VERBOSE = true
|
||||
start = true
|
||||
|
||||
assert_nothing_raised(ThreadError, bug5754) {t1.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([:pre, :post], scratch, bug5754)
|
||||
|
||||
|
@ -459,6 +463,7 @@ class TestRequire < Test::Unit::TestCase
|
|||
assert_match(/in #{__method__}'$/o, output)
|
||||
}
|
||||
ensure
|
||||
$VERBOSE = verbose
|
||||
$stderr = stderr
|
||||
$".delete(path)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue