add failing test for 'd$' motion

This commit is contained in:
2025-10-16 11:04:26 +01:00
parent abde4dc8a6
commit c190cec868
2 changed files with 27 additions and 1 deletions

View File

@@ -1 +1,2 @@
hello again hello
world

View File

@@ -2956,6 +2956,30 @@ struct
end) end)
] ]
val dDlrDelete = describe "delete motion 'd$'"
[test
"deletes only last character on line \
\when cursor is on last character"
(fn _ =>
let
(* arrange *)
val originalString = "hello\nworld\n"
val app = TestUtils.init originalString
val app = AppWith.idx (app, 4)
(* act *)
val {buffer, cursorIdx, ...} = TestUtils.updateMany (app, "d$")
(* assert *)
val actualString = LineGap.toString buffer
val expectedString = originalString
val expectedCursorIdx = 3
in
Expect.isTrue
(actualString = expectedString
andalso cursorIdx = expectedCursorIdx)
end)]
val tests = val tests =
[ dhDelete [ dhDelete
, dlDelete , dlDelete
@@ -2973,5 +2997,6 @@ struct
, dGDelete , dGDelete
, dggDelete , dggDelete
, d0Delete , d0Delete
, dDlrDelete
] ]
end end