Eliminates the cl-tty.container package by merging scrollbox and tabbar components directly into cl-tty.box, where the component system lives. Changes: - added scrollbox/tabbar exports to cl-tty.box defpackage in package.org - changed scrollbox.org in-package from cl-tty.container to cl-tty.box - changed tabbar.org in-package from cl-tty.container to cl-tty.box - tabbar's key-event-key references are qualified with cl-tty.input: (avoids circular :use dependency with cl-tty.input which :uses cl-tty.box) - deleted container-package.org - updated test packages, integration tests, scripts, ASDF - all 14 test suites pass at 100%
101 lines
4.4 KiB
Common Lisp
101 lines
4.4 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 merged into box (v0.6.0)
|
|
(:file "scrollbox" :depends-on ("package" "dirty" "box"))
|
|
(:file "tabbar" :depends-on ("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" "input-package"))
|
|
(:file "dialog" :depends-on ("dialog-package" "dirty" "text-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 "markdown-tests" :pathname "../../tests/markdown-tests")
|
|
(:file "dialog-tests" :pathname "../../tests/dialog-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-markdown-test)
|
|
(:cl-tty-dialog-test "DIALOG-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)))))
|