From a5b6d7bca84fce6e13c68e8753893c4697960e3a Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 13 Nov 2019 15:10:05 +0900 Subject: Suppress warnings except for when last evaluation Co-authored-by: Kazuhiro NISHIYAMA --- test/irb/test_context.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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([ -- cgit v1.2.3