summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-11-13 15:10:05 +0900
committeraycabta <aycabta@gmail.com>2019-11-13 15:15:28 +0900
commita5b6d7bca84fce6e13c68e8753893c4697960e3a (patch)
treed31f7f82bdd78007b94f1cbb90a30e56550a610f /test
parentc33d29fba5a04bd31242eb51e54d2ec198c34ba3 (diff)
Suppress warnings except for when last evaluation
Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_context.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb
index d58477c84e..075db35d2b 100644
--- a/test/irb/test_context.rb
+++ b/test/irb/test_context.rb
@@ -63,6 +63,12 @@ module TestIRB
assert_not_match(/rescue _\.class/, e.message)
end
+ def test_evaluate_with_onigmo_warning
+ assert_warning("(irb):1: warning: character class has duplicated range: /[aa]/\n") do
+ @context.evaluate('/[aa]/', 1)
+ end
+ end
+
def test_eval_input
verbose, $VERBOSE = $VERBOSE, nil
input = TestInputMethod.new([