mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/lib/leakchecker.rb: Add check_verbose
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a88a03e6b3
commit
d0775a1120
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@ class LeakChecker
|
||||||
@thread_info = find_threads
|
@thread_info = find_threads
|
||||||
@env_info = find_env
|
@env_info = find_env
|
||||||
@encoding_info = find_encodings
|
@encoding_info = find_encodings
|
||||||
|
@old_verbose = $VERBOSE
|
||||||
end
|
end
|
||||||
|
|
||||||
def check(test_name)
|
def check(test_name)
|
||||||
|
@ -16,6 +17,7 @@ class LeakChecker
|
||||||
check_env(test_name),
|
check_env(test_name),
|
||||||
check_encodings(test_name),
|
check_encodings(test_name),
|
||||||
check_safe(test_name),
|
check_safe(test_name),
|
||||||
|
check_verbose(test_name),
|
||||||
]
|
]
|
||||||
GC.start if leaks.any?
|
GC.start if leaks.any?
|
||||||
end
|
end
|
||||||
|
@ -24,6 +26,10 @@ class LeakChecker
|
||||||
puts "#{test_name}: $SAFE == #{$SAFE}" unless $SAFE == 0
|
puts "#{test_name}: $SAFE == #{$SAFE}" unless $SAFE == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_verbose test_name
|
||||||
|
puts "#{test_name}: $VERBOSE == #{$VERBOSE}" unless @old_verbose == $VERBOSE
|
||||||
|
end
|
||||||
|
|
||||||
def find_fds
|
def find_fds
|
||||||
if IO.respond_to?(:console) and (m = IO.method(:console)).arity.nonzero?
|
if IO.respond_to?(:console) and (m = IO.method(:console)).arity.nonzero?
|
||||||
m[:close]
|
m[:close]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue