mirror of
https://github.com/hymkor/lispect.git
synced 2026-08-28 04:46:59 -04:00
29 lines
588 B
Common Lisp
29 lines
588 B
Common Lisp
(if (equal (getenv "OS") "Windows_NT")
|
|
(spawn "cmd.exe" "/k" "set PROMPT=$$$S")
|
|
(spawn "bash"))
|
|
|
|
(defglobal ctrlc (create-string 1 (convert 3 <character>)))
|
|
(block main
|
|
(while t
|
|
(expect*
|
|
("xxx"
|
|
(send ctrlc)
|
|
(expect "$ ")
|
|
(sendln "exit")
|
|
(return-from main nil)
|
|
)
|
|
(("yyy" "zzz")
|
|
(send ctrlc)
|
|
(expect "$ ")
|
|
(sendln "echo test")
|
|
)
|
|
(10 ; timeout second
|
|
(send ctrlc)
|
|
(expect "$ ")
|
|
(sendln "exit")
|
|
(return-from main nil)
|
|
)
|
|
)
|
|
)
|
|
)
|