luv

Workshop wiki

tests.lisp

ghostty/tests.lisp

system luv/ghostty/test · 4 definitions · on GitHub

defpackage#:luv.ghostty.tests
:use#:cl#:rove
:local-nicknames
#:ghostty#:luv.ghostty
in-package#:luv.ghostty.tests
deftestvt-input-round-trips-through-plain-formatter
ghostty:with-terminal
terminal:columns24:rows4
ghostty:write-terminalterminal
formatnil"Hello, ~C[1;32mGhostty~C[0m!~C~CSecond line"
code-char27
code-char27
#\Return#\Newline
ok
equal
formatnil"Hello, Ghostty!~%Second line"
deftestkey-encoding-follows-live-terminal-modes
ghostty:with-terminal
ghostty:with-key-encoder
encoder
ok
equal'
279165
coerce
ghostty:encode-key-eventencoderterminal:press:arrow-up
'list
ghostty:write-terminalterminal
formatnil"~C[?1h"
code-char27
ok
equal'
277965
coerce
ghostty:encode-key-eventencoderterminal:press:arrow-up
'list
ok
equal'
1
coerce
ghostty:encode-key-eventencoderterminal:press:a:modifiers'
:control
:text"a":unshifted-codepoint
char-code#\a
'list