Skip to content

Commit 268e02b

Browse files
committed
Add scrollbar scroll-to-bottom test and fix existing scrollbar rendeing test
1 parent e21b69a commit 268e02b

File tree

1 file changed

+36
-10
lines changed

1 file changed

+36
-10
lines changed

test/reline/yamatanooroti/test_rendering.rb

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,32 @@ def test_autocomplete_long_with_scrollbar_scroll
10811081
EOC
10821082
end
10831083

1084+
def test_autocomplete_super_long_scroll_to_bottom
1085+
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete-super-long}, startup_message: 'Multiline REPL.')
1086+
shift_tab = [27, 91, 90]
1087+
write('S' + shift_tab.map(&:chr).join)
1088+
close
1089+
assert_screen(<<~'EOC')
1090+
Multiline REPL.
1091+
prompt> Str_BXX
1092+
Str_BXJ
1093+
Str_BXK
1094+
Str_BXL
1095+
Str_BXM
1096+
Str_BXN
1097+
Str_BXO
1098+
Str_BXP
1099+
Str_BXQ
1100+
Str_BXR
1101+
Str_BXS
1102+
Str_BXT
1103+
Str_BXU
1104+
Str_BXV
1105+
Str_BXW
1106+
Str_BXX▄
1107+
EOC
1108+
end
1109+
10841110
def test_autocomplete_super_long_and_backspace
10851111
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete-super-long}, startup_message: 'Multiline REPL.')
10861112
shift_tab = [27, 91, 90]
@@ -1090,15 +1116,15 @@ def test_autocomplete_super_long_and_backspace
10901116
assert_screen(<<~'EOC')
10911117
Multiline REPL.
10921118
prompt> Str_BX
1093-
Str_BX
1094-
Str_BXA
1095-
Str_BXB
1096-
Str_BXC
1097-
Str_BXD
1098-
Str_BXE
1099-
Str_BXF
1100-
Str_BXG
1101-
Str_BXH
1119+
Str_BX
1120+
Str_BXA
1121+
Str_BXB
1122+
Str_BXC
1123+
Str_BXD
1124+
Str_BXE
1125+
Str_BXF
1126+
Str_BXG
1127+
Str_BXH
11021128
Str_BXI
11031129
Str_BXJ
11041130
Str_BXK
@@ -1142,7 +1168,7 @@ def test_dialog_narrower_than_screen_with_scrollbar
11421168
Multiline R
11431169
EPL.
11441170
prompt> Sym
1145-
String
1171+
String
11461172
Struct █
11471173
Symbol █
11481174
StopIterat█

0 commit comments

Comments
 (0)