Bug fixes:
- Fix OSC8 format strings (backslash escape layering) in modern-backend.org
- Test format string had single backslash instead of double, causing
unclosed CL string that cascaded through 3 subsequent test forms
- Implementation format string had leading escaped quote (not a string
opener) and triple-backslash ending (also not a string terminator)
- Fix missing closing parens in border-char-rounded and border-char-double tests
- Fix ASDF input-tests pathname (file lives in tests/, not src/components/)
New features:
- Implement suspend-backend / resume-backend protocol methods
- modern-backend: exit/enter alt screen, re-enable mouse/kitty/bracketed-paste
- simple-backend: no-ops (no terminal state to preserve)
Infrastructure:
- Update test suite to cover suspend/resume (backend + modern-backend suites)
- 454 checks, 100% pass across 14 test suites
112 lines
5.1 KiB
Common Lisp
112 lines
5.1 KiB
Common Lisp
;;; cl-tty.asd — Common Lisp Terminal UI Framework
|
|
(asdf:defsystem :cl-tty
|
|
:description "Reusable Common Lisp Terminal UI Framework"
|
|
:author "Amr Gharbeia"
|
|
:version "1.0.0"
|
|
:license "GPL-3.0"
|
|
:depends-on (:sb-posix)
|
|
:components
|
|
((:module "src/backend"
|
|
:components
|
|
((:file "package")
|
|
(:file "classes" :depends-on ("package"))
|
|
(:file "simple" :depends-on ("package" "classes"))
|
|
(:file "modern" :depends-on ("package" "classes"))
|
|
(:file "detection" :depends-on ("package" "classes"))))
|
|
(:module "src/layout"
|
|
:components
|
|
((:file "layout")))
|
|
(:module "src/rendering"
|
|
:components
|
|
((:file "framebuffer")))
|
|
(:module "src/components"
|
|
:components
|
|
((:file "package")
|
|
(:file "dirty")
|
|
(:file "box" :depends-on ("package"))
|
|
(:file "text" :depends-on ("package" "box"))
|
|
(:file "render" :depends-on ("package" "box" "text"))
|
|
(:file "theme" :depends-on ("package"))
|
|
;; Input system (v0.5.0)
|
|
(:file "input-package" :depends-on ("package"))
|
|
(:file "input" :depends-on ("input-package" "dirty" "box"))
|
|
(:file "text-input" :depends-on ("input-package" "input" "box"))
|
|
(:file "textarea" :depends-on ("input-package" "input" "box"))
|
|
(:file "keybindings" :depends-on ("input-package" "input"))
|
|
;; Container components (v0.6.0)
|
|
(:file "container-package" :depends-on ("package" "input-package"))
|
|
(:file "scrollbox" :depends-on ("container-package" "dirty" "box"))
|
|
(:file "tabbar" :depends-on ("container-package" "dirty" "box"))
|
|
;; Select widget (v0.7.0)
|
|
(:file "select-package" :depends-on ("package" "input-package"))
|
|
(:file "select" :depends-on ("select-package" "dirty" "box"))
|
|
;; Markdown + Code + Diff rendering (v0.8.0)
|
|
(:file "markdown-package" :depends-on ("package"))
|
|
(:file "markdown" :depends-on ("markdown-package"))
|
|
;; Dialog + Toast (v0.9.0)
|
|
(:file "dialog-package" :depends-on ("package" "select-package" "input-package"))
|
|
(:file "dialog" :depends-on ("dialog-package" "dirty" "select" "text-input"))
|
|
;; Mouse support (v0.10.0)
|
|
(:file "mouse-package" :depends-on ("package" "input-package"))
|
|
(:file "mouse" :depends-on ("mouse-package" "dirty" "input"))
|
|
;; Slot system (v0.11.0)
|
|
(:file "slot-package" :depends-on ("package"))
|
|
(:file "slot" :depends-on ("slot-package")))))
|
|
:in-order-to ((test-op (test-op :cl-tty/test))))
|
|
|
|
(asdf:defsystem :cl-tty/test
|
|
:description "Test suite for cl-tty"
|
|
:depends-on (:cl-tty :fiveam)
|
|
:components
|
|
((:module "src/backend"
|
|
:components
|
|
((:file "tests")
|
|
(:file "modern-tests" :depends-on ("tests"))))
|
|
(:module "src/layout"
|
|
:components
|
|
((:file "tests")))
|
|
(:module "src/components"
|
|
:components
|
|
((:file "box-tests")
|
|
(:file "dirty-tests")
|
|
(:file "render-tests")
|
|
(:file "theme-tests")
|
|
(:file "input-tests" :pathname "../../tests/input-tests")
|
|
(:file "scrollbox-tabbar-tests" :pathname "../../tests/scrollbox-tabbar-tests")
|
|
(:file "select-tests" :pathname "../../tests/select-tests")
|
|
(:file "markdown-tests" :pathname "../../tests/markdown-tests")
|
|
(:file "dialog-tests" :pathname "../../tests/dialog-tests")
|
|
(:file "mouse-tests" :pathname "../../tests/mouse-tests")
|
|
(:file "slot-tests" :pathname "../../tests/slot-tests")))
|
|
(:module "src/rendering"
|
|
:components
|
|
((:file "framebuffer-tests" :pathname "../../tests/framebuffer-tests"))))
|
|
:perform (test-op (o c)
|
|
(let ((run (find-symbol "RUN" :fiveam))
|
|
(explain (find-symbol "EXPLAIN!" :fiveam))
|
|
(status (find-symbol "RESULTS-STATUS" :fiveam))
|
|
(all-passed t))
|
|
(dolist (suite '((:cl-tty-backend-test "BACKEND-SUITE")
|
|
(:cl-tty-box-test "BOX-SUITE")
|
|
(:cl-tty-input-test "INPUT-SUITE")
|
|
(:cl-tty-scrollbox-test "SCROLLBOX-SUITE")
|
|
(:cl-tty-select-test "SELECT-SUITE")
|
|
(:cl-tty-markdown-test)
|
|
(:cl-tty-dialog-test "DIALOG-SUITE")
|
|
(:cl-tty-mouse-test "MOUSE-SUITE")
|
|
(:cl-tty-slot-test "SLOT-SUITE")
|
|
(:cl-tty-layout-test "LAYOUT-SUITE")
|
|
(:cl-tty-modern-backend-test "MODERN-BACKEND-SUITE")
|
|
(:cl-tty-framebuffer-test "FRAMEBUFFER-SUITE")))
|
|
(let* ((pkg (find-package (first suite)))
|
|
(suite-name (second suite))
|
|
(s (cond (suite-name (find-symbol suite-name pkg))
|
|
(pkg (find-symbol (string (first suite)) :keyword))
|
|
(t nil))))
|
|
(when s
|
|
(let ((result (funcall run s)))
|
|
(funcall explain result)
|
|
(unless (funcall status result)
|
|
(setf all-passed nil))))))
|
|
(uiop:quit (if all-passed 0 1)))))
|