mirror of
https://github.com/hymkor/lispect.git
synced 2026-08-29 05:16:34 -04:00
Implement (expect) like (case)
This commit is contained in:
+4
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user