Implement (expect) like (case)

This commit is contained in:
HAYAMA_Kaoru
2024-11-30 02:28:24 +09:00
parent de6a18813b
commit 4ffb196563
3 changed files with 62 additions and 6 deletions
+4 -4
View File
@@ -2,17 +2,17 @@
(let ((ctrlc (format nil "~A" (convert 3 <character>))))
(block main
(while t
(case (expect* 'timeout 10 "xxx" "yyy")
((0)
(expect
("xxx"
(send ctrlc)
(sendln "exit")
(return-from main nil)
)
((1)
(("yyy" "zzz")
(send ctrlc)
(sendln "rem")
)
((-1)
(10 ; timeout second
(send ctrlc)
(sendln "exit")
(return-from main nil)