summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-31 02:29:19 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-31 02:29:19 +0000
commitd0775a112044602feb53746cec3ea7efa6847cd0 (patch)
treef163aca7c9acc02cf36fe5adc745574b87dd5c99 /test/lib
parenta88a03e6b3e83876568d5148b44b637aeb84d0d5 (diff)
test/lib/leakchecker.rb: Add check_verbose
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/leakchecker.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lib/leakchecker.rb b/test/lib/leakchecker.rb
index dbe6f5cdbb..af9200bf77 100644
--- a/test/lib/leakchecker.rb
+++ b/test/lib/leakchecker.rb
@@ -6,6 +6,7 @@ class LeakChecker
@thread_info = find_threads
@env_info = find_env
@encoding_info = find_encodings
+ @old_verbose = $VERBOSE
end
def check(test_name)
@@ -16,6 +17,7 @@ class LeakChecker
check_env(test_name),
check_encodings(test_name),
check_safe(test_name),
+ check_verbose(test_name),
]
GC.start if leaks.any?
end
@@ -24,6 +26,10 @@ class LeakChecker
puts "#{test_name}: $SAFE == #{$SAFE}" unless $SAFE == 0
end
+ def check_verbose test_name
+ puts "#{test_name}: $VERBOSE == #{$VERBOSE}" unless @old_verbose == $VERBOSE
+ end
+
def find_fds
if IO.respond_to?(:console) and (m = IO.method(:console)).arity.nonzero?
m[:close]