aboutsummaryrefslogtreecommitdiffstats
path: root/test/reline/helper.rb
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2023-02-27 19:21:25 +0900
committergit <svn-admin@ruby-lang.org>2023-02-27 10:21:30 +0000
commit4f611df3f7f61fbdf83b02121dd1edea0b7c68ec (patch)
tree687cdd4b697f08a62bd2c7be04fa83a16f322c16 /test/reline/helper.rb
parent2cbe1f3ebc15e5adf5ea68b9371a16a2d26724b3 (diff)
downloadruby-4f611df3f7f61fbdf83b02121dd1edea0b7c68ec.tar.gz
[ruby/reline] Fix wrong indent number in prompt. whole_lines has
duplicated line. (https://github.com/ruby/reline/pull/460) * whole_lines should consider prev_line_index, and must not duplicate last_line * Add test for lines passed to dynamic prompt proc * Refactor whole_lines parameters used in test helper * Remove whole_line's arguments
Diffstat (limited to 'test/reline/helper.rb')
-rw-r--r--test/reline/helper.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/test/reline/helper.rb b/test/reline/helper.rb
index c2a47a79d1..b8751ff16e 100644
--- a/test/reline/helper.rb
+++ b/test/reline/helper.rb
@@ -157,13 +157,7 @@ class Reline::TestCase < Test::Unit::TestCase
end
def assert_whole_lines(expected)
- previous_line_index = @line_editor.instance_variable_get(:@previous_line_index)
- if previous_line_index
- lines = @line_editor.whole_lines(index: previous_line_index)
- else
- lines = @line_editor.whole_lines
- end
- assert_equal(expected, lines)
+ assert_equal(expected, @line_editor.whole_lines)
end
def assert_key_binding(input, method_symbol, editing_modes = [:emacs, :vi_insert, :vi_command])