v0.8.0: tangle to XDG (~/.local/share/cl-tty/), remove stale memex .lisp files
This commit is contained in:
@@ -39,7 +39,7 @@ The run-all-tests.lisp loader references this suite by name
|
||||
(~\"INTEGRATION-SUITE\"~) and looks it up via ~find-symbol~ in the
|
||||
package, so the symbol must be interned and accessible.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
;;; integration-tests.lisp — Full pipeline integration tests for cl-tty
|
||||
;;;
|
||||
;;; Composes all major components through the rendering pipeline onto a
|
||||
@@ -75,7 +75,7 @@ The framebuffer stores cells in a 2D array indexed as ~(aref cells y x)~.
|
||||
Cells are structs with a ~cell-char~ slot holding the character. We
|
||||
iterate horizontally and collect each ~cell-char~ into a string.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(defun fb-string (fb x y &optional (len 1))
|
||||
"Read a string of LEN characters from framebuffer FB starting at (X,Y)."
|
||||
(let* ((cells (fb-framebuffer fb))
|
||||
@@ -95,7 +95,7 @@ Extracts all rows from the framebuffer as a list of strings. Each row is
|
||||
the full width of the framebuffer converted via ~fb-string~. Optional
|
||||
~start-row~ and ~end-row~ keywords let callers inspect a sub-region.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(defun fb-lines (fb &key (start-row 0) (end-row nil))
|
||||
"Extract all lines from framebuffer FB as a list of strings."
|
||||
(let* ((cells (fb-framebuffer fb))
|
||||
@@ -116,7 +116,7 @@ newlines and runs ~search~.
|
||||
This is the most commonly used assertion helper — it lets tests check for
|
||||
the presence of rendered text without specifying exact coordinates.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(defun fb-contains (fb text)
|
||||
"Return T if framebuffer FB contains TEXT anywhere."
|
||||
(let ((all-text (format nil "~{~a~^~%~}" (fb-lines fb))))
|
||||
@@ -135,7 +135,7 @@ The title is rendered starting at column 2 of row 1 (just inside the
|
||||
top border). We check ~fb-string~ at those exact coordinates for the
|
||||
title text, and ~fb-contains~ for the border characters.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test box-title-renders-on-fb
|
||||
"A Box with a title draws border and title text on framebuffer."
|
||||
(let* ((fb (make-framebuffer-backend :width 40 :height 10))
|
||||
@@ -160,7 +160,7 @@ Word-wrap mode ~:word~ preserves word boundaries — it only wraps between
|
||||
words, never in the middle of one. The framebuffer is 20 columns wide, so
|
||||
each row holds roughly 2-3 words.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test text-component-on-fb
|
||||
"Text component renders word-wrapped content on framebuffer."
|
||||
(let* ((fb (make-framebuffer-backend :width 20 :height 6))
|
||||
@@ -186,7 +186,7 @@ Direct cell access (~aref~ on the framebuffer array) is necessary because
|
||||
the cursor block is a single character that ~fb-contains~ could match
|
||||
ambiguously.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test textinput-value-on-fb
|
||||
"TextInput renders its value and cursor on framebuffer."
|
||||
(let* ((fb (make-framebuffer-backend :width 40 :height 3))
|
||||
@@ -213,7 +213,7 @@ The placeholder must disappear once a value is set — that behavior is
|
||||
tested indirectly here by verifying the placeholder text appears on an
|
||||
empty input.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test textinput-placeholder-on-fb
|
||||
"TextInput with empty value shows placeholder text."
|
||||
(let* ((fb (make-framebuffer-backend :width 40 :height 3))
|
||||
@@ -236,7 +236,7 @@ with ~scroll-y=2~ and a viewport height of 8. Lines 1-2 should be
|
||||
scrolled out, while Lines 3-8 should be visible. We check both presence
|
||||
(visible lines) and absence (scrolled-out lines).
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test scrollbox-children-on-fb
|
||||
"ScrollBox renders visible children offset by scroll position."
|
||||
(let* ((fb (make-framebuffer-backend :width 40 :height 10))
|
||||
@@ -276,7 +276,7 @@ The ~make-select~ function takes a list of plists with ~:title~ and
|
||||
~:value~ keys. The render method iterates over options and draws each
|
||||
title.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test select-options-on-fb
|
||||
"Select renders option titles on framebuffer."
|
||||
(let* ((fb (make-framebuffer-backend :width 40 :height 10))
|
||||
@@ -304,7 +304,7 @@ global stack, renders it, and checks for the title and ASCII border
|
||||
characters. The backdrop is a dimming overlay applied across the full
|
||||
framebuffer area.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test dialog-appears-on-fb
|
||||
"Dialog renders a dimmed backdrop and dialog panel with title."
|
||||
(let* ((fb (make-framebuffer-backend :width 80 :height 24))
|
||||
@@ -331,7 +331,7 @@ verifies that only the top dialog (\"Dialog Two\") renders, then pops it
|
||||
and verifies that \"Dialog One\" appears after clearing and re-rendering.
|
||||
This exercises the full push-pop-render cycle.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test dialog-push-pop-render
|
||||
"Dialog push/pop cycle works with rendering."
|
||||
(let* ((fb (make-framebuffer-backend :width 80 :height 24))
|
||||
@@ -359,7 +359,7 @@ in the list, verifies the message text appears, and then dismisses it to
|
||||
clean up. The ~duration~ is set to 0 so the toast does not auto-dismiss
|
||||
during the test.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test toast-appears-on-fb
|
||||
"Toast notification renders with colored background."
|
||||
(let* ((fb (make-framebuffer-backend :width 80 :height 24)))
|
||||
@@ -380,7 +380,7 @@ This test creates a simple tree with a single Box, calls
|
||||
appear. This validates that the pipeline dispatches correctly from root
|
||||
through the component hierarchy.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test render-screen-pipeline
|
||||
"render-screen processes a component tree through the full pipeline."
|
||||
(let* ((fb (make-framebuffer-backend :width 40 :height 12))
|
||||
@@ -410,7 +410,7 @@ Each component is positioned manually via ~layout-node-x~ and
|
||||
~layout-node-y~ to simulate a composed screen. All components must coexist
|
||||
without overwriting each other's output.
|
||||
|
||||
#+BEGIN_SRC lisp :tangle ../tests/integration-tests.lisp
|
||||
#+BEGIN_SRC lisp :tangle ~/.local/share/cl-tty/tests/integration-tests.lisp
|
||||
(test full-composition-via-fb
|
||||
"All components compose correctly on a single framebuffer."
|
||||
(let* ((fb (make-framebuffer-backend :width 60 :height 24)))
|
||||
|
||||
Reference in New Issue
Block a user