format test file

This commit is contained in:
2024-11-19 03:53:22 +00:00
parent d92d3b3a26
commit 09165b48d9

View File

@@ -6,19 +6,18 @@ val emptyVec = Vector.fromList []
val cursorTests = describe "cursor operations" val cursorTests = describe "cursor operations"
[ test "'l' moves cursor leftward by one when cursorIdx < length" (fn _ => [ test "'l' moves cursor leftward by one when cursorIdx < length" (fn _ =>
let let
(* arrange *) (* arrange *)
val buffer = LineGap.fromString "hello world" val buffer = LineGap.fromString "hello world"
val app = AppType.init (buffer, 0, 0) val app = AppType.init (buffer, 0, 0)
(* act *) (* act *)
val ({cursorIdx, ...}, _) = AppUpdate.update (app, CHAR_EVENT #"l") val ({cursorIdx, ...}, _) = AppUpdate.update (app, CHAR_EVENT #"l")
(* assert *) (* assert *)
in in
Expect.isTrue (cursorIdx = 1) Expect.isTrue (cursorIdx = 1)
end end)
)
, test "'w' moves cursor to start of next word in contiguous string" (fn _ => , test "'w' moves cursor to start of next word in contiguous string" (fn _ =>
let let