add tests for 'yh' motion

This commit is contained in:
2026-01-07 06:33:10 +00:00
parent adb8757ed8
commit 8b0031ca71
7 changed files with 136 additions and 11 deletions

View File

@@ -24,4 +24,34 @@ struct
in
loop (0, app)
end
fun expectYank (app: AppType.app_type, expectedString) =
let
open MailboxType
open DrawMsg
open Railroad
open Railroad.Test
fun loop (hd :: tl) =
(case hd of
DRAW (YANK actualString) =>
if actualString = expectedString then
Expect.isTrue (actualString = expectedString)
else
let
val () = print
("expectedString = [" ^ expectedString ^ "]\n")
val () = print ("actualString = [" ^ actualString ^ "]\n")
val () = print "\n"
in
Expect.isTrue (actualString = expectedString)
end
| _ => loop tl)
| loop ([]) =
let val () = print "no string yanked\n"
in Expect.isTrue false
end
in
loop (#msgs app)
end
end