add another test for 'dw' motion
This commit is contained in:
@@ -944,6 +944,30 @@ struct
|
|||||||
in
|
in
|
||||||
Expect.isTrue (stringsAreExpected andalso cursorsAreExpected)
|
Expect.isTrue (stringsAreExpected andalso cursorsAreExpected)
|
||||||
end)
|
end)
|
||||||
|
, test
|
||||||
|
"deletes newline when there is a newline after current word \
|
||||||
|
\and there is another word following that newline"
|
||||||
|
(fn _ =>
|
||||||
|
let
|
||||||
|
(* arrange *)
|
||||||
|
val originalString = "hello\nworld\nagain\n"
|
||||||
|
val app = TestUtils.init originalString
|
||||||
|
val app = AppWith.idx (app, 1)
|
||||||
|
|
||||||
|
(* act *)
|
||||||
|
val {buffer, cursorIdx, ...} = TestUtils.updateMany (app, "dw")
|
||||||
|
|
||||||
|
(* assert *)
|
||||||
|
val expectedString = "hworld\nagain\n"
|
||||||
|
val expectedCursor = 1
|
||||||
|
|
||||||
|
val actualString = LineGap.toString buffer
|
||||||
|
|
||||||
|
val stringIsExpected = expectedString = actualString
|
||||||
|
val cursorIsExpected = expectedCursor = cursorIdx
|
||||||
|
in
|
||||||
|
Expect.isTrue (stringIsExpected andalso cursorIsExpected)
|
||||||
|
end)
|
||||||
]
|
]
|
||||||
|
|
||||||
val tests = [dhDelete, dlDelete, djDelete, ddDelete, dkDelete, dwDelete]
|
val tests = [dhDelete, dlDelete, djDelete, ddDelete, dkDelete, dwDelete]
|
||||||
|
|||||||
Reference in New Issue
Block a user