2024-11-30 11:22:19 +09:00
2024-11-29 17:57:13 +09:00
2024-11-29 17:57:13 +09:00
2024-11-30 12:00:25 +09:00
2024-11-30 11:22:19 +09:00
2024-12-01 00:54:19 +09:00
2024-11-29 13:44:11 +09:00
2024-11-30 10:45:36 +09:00

Lispect

  • A text-terminal automation tool similar to expect(1) of UNIX and Linux
  • It runs on Windows 10 and later, and Linux
  • The script is written in the subset of ISLisp (gmnlisp)
(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)
       )
      )
    )
  )

Technologies used

S
Description
A text-terminal automation tool similar to expect(1) using ISLisp (gmnlisp)
Readme MIT
161 KiB
Languages
Go 85.7%
Makefile 7.5%
NewLisp 6.8%