Add missing test for Vi mode $

PR #10953 reports missing coverage for the change to update_buff_pos()
in d51f669647 (Vi mode: avoid placing cursor beyond last character,
2024-02-14).

Add a case demonstrating how $ should not move the cursor past the
last character. Goes without saying that it's really ugly that we
update_buff_pos() must be so defensive here, ideally we wouldn't pass
it out-of-bounds positions.
This commit is contained in:
Johannes Altmanninger 2024-12-30 00:10:59 +01:00
parent 6043644f52
commit ca28d0a78f

View file

@ -241,6 +241,12 @@ expect_prompt("foo")
# send("hh~~bbve~\r")
# expect_prompt(TO_END + "SOME TeXT\r\n", unmatched="Couldn't find expected output 'SOME TeXT")
send("echo 125")
send("\033")
sleep(0.200)
send("0$i34\r")
expect_prompt("echo 12345")
# Now test that exactly the expected bind modes are defined
sendline("bind --list-modes")
expect_prompt(