mirror of
https://github.com/hymkor/lispect.git
synced 2026-09-02 07:07:53 -04:00
example.lsp runs on Linux and Windows
This commit is contained in:
+25
-20
@@ -1,23 +1,28 @@
|
|||||||
(spawn "cmd.exe")
|
(if (equal (getenv "OS") "Windows_NT")
|
||||||
(let ((ctrlc (format nil "~A" (convert 3 <character>))))
|
(spawn "cmd.exe" "/k" "set PROMPT=$$$S")
|
||||||
(block main
|
(spawn "bash"))
|
||||||
(while t
|
|
||||||
(expect*
|
(defglobal ctrlc (format nil "~A" (convert 3 <character>)))
|
||||||
("xxx"
|
(block main
|
||||||
(send ctrlc)
|
(while t
|
||||||
(sendln "exit")
|
(expect*
|
||||||
(return-from main nil)
|
("xxx"
|
||||||
)
|
(send ctrlc)
|
||||||
(("yyy" "zzz")
|
(expect "$ ")
|
||||||
(send ctrlc)
|
(sendln "exit")
|
||||||
(sendln "rem")
|
(return-from main nil)
|
||||||
)
|
)
|
||||||
(10 ; timeout second
|
(("yyy" "zzz")
|
||||||
(send ctrlc)
|
(send ctrlc)
|
||||||
(sendln "exit")
|
(expect "$ ")
|
||||||
(return-from main nil)
|
(sendln "echo test")
|
||||||
)
|
)
|
||||||
)
|
(10 ; timeout second
|
||||||
|
(send ctrlc)
|
||||||
|
(expect "$ ")
|
||||||
|
(sendln "exit")
|
||||||
|
(return-from main nil)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user