File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1897,12 +1897,19 @@ def test_em_set_mark_and_em_exchange_mark
1897
1897
end
1898
1898
1899
1899
def test_modify_lines_with_wrong_rs
1900
+ verbose , $VERBOSE = $VERBOSE, nil
1900
1901
original_global_slash = $/
1901
1902
$/ = 'b'
1903
+ $VERBOSE = verbose
1902
1904
@line_editor . output_modifier_proc = proc { |output | Reline ::Unicode . escape_for_print ( output ) }
1903
1905
input_keys ( "abcdef\n " )
1904
- assert_equal ( [ 'abcdef' ] , @line_editor . __send__ ( :modify_lines , @line_editor . whole_lines ) )
1906
+ result = @line_editor . __send__ ( :modify_lines , @line_editor . whole_lines )
1907
+ $/ = nil
1908
+ assert_equal ( [ 'abcdef' ] , result )
1909
+ ensure
1910
+ $VERBOSE = nil
1905
1911
$/ = original_global_slash
1912
+ $VERBOSE = verbose
1906
1913
end
1907
1914
1908
1915
=begin # TODO: move KeyStroke instance from Reline to LineEditor
You can’t perform that action at this time.
0 commit comments