(expect*) supports the option 'timeout SECOND

This commit is contained in:
HAYAMA_Kaoru
2024-11-30 01:09:34 +09:00
parent 43ae74149d
commit c99698837d
3 changed files with 44 additions and 8 deletions
+9 -2
View File
@@ -2,7 +2,7 @@
(let ((ctrlc (format nil "~A" (convert 3 <character>))))
(block main
(while t
(case (expect* "xxx" "yyy")
(case (expect* 'timeout 10 "xxx" "yyy")
((0)
(sendln (string-append ctrlc "exit"))
(return-from main nil)
@@ -10,4 +10,11 @@
((1)
(sendln (string-append ctrlc "rem"))
)
))))
((-1)
(sendln (string-append ctrlc "exit"))
(return-from main nil)
)
)
)
)
)