[ruby/reline] Suppress $/ warnings

https://github.com/ruby/reline/commit/f4eac8c76f
This commit is contained in:
Nobuyoshi Nakada 2020-03-27 00:49:49 +09:00
Родитель 16c90f0678
Коммит 3486a460ea
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -1897,12 +1897,19 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
end
def test_modify_lines_with_wrong_rs
verbose, $VERBOSE = $VERBOSE, nil
original_global_slash = $/
$/ = 'b'
$VERBOSE = verbose
@line_editor.output_modifier_proc = proc { |output| Reline::Unicode.escape_for_print(output) }
input_keys("abcdef\n")
assert_equal(['abcdef'], @line_editor.__send__(:modify_lines, @line_editor.whole_lines))
result = @line_editor.__send__(:modify_lines, @line_editor.whole_lines)
$/ = nil
assert_equal(['abcdef'], result)
ensure
$VERBOSE = nil
$/ = original_global_slash
$VERBOSE = verbose
end
=begin # TODO: move KeyStroke instance from Reline to LineEditor