Files
lispect/example.lsp
T

29 lines
602 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 'interval 200 "echo test")
)
(10 ; timeout second
(send ctrlc)
(expect "$ ")
(sendln "exit")
(return-from main nil)
)
)
)
)