tests: all 16 tests now sourced from org (doctor→diagnostics rename, orphaned tests adopted)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
This commit is contained in:
@@ -180,5 +180,30 @@ Event handlers + daemon I/O + main loop.
|
||||
(redraw sw cw ch iw)
|
||||
(refresh scr)
|
||||
(sleep 0.03))
|
||||
(disconnect-daemon))))
|
||||
(disconnect-daemon))))
|
||||
|
||||
#+end_src
|
||||
|
||||
* Test Suite
|
||||
#+begin_src lisp :tangle ../tests/tui-tests.lisp
|
||||
(eval-when (:compile-toplevel :load-toplevel :execute)
|
||||
(ql:quickload :fiveam :silent t))
|
||||
|
||||
(defpackage :passepartout-tui-tests
|
||||
(:use :cl :passepartout)
|
||||
(:export #:tui-suite))
|
||||
|
||||
(in-package :passepartout-tui-tests)
|
||||
|
||||
(fiveam:def-suite tui-suite :description "Verification of the TUI parsing and styling logic")
|
||||
(fiveam:in-suite tui-suite)
|
||||
|
||||
(fiveam:test test-tui-connection-drop
|
||||
"Tier 2 Chaos: Verify that handle-return degrades gracefully when the daemon connection is lost."
|
||||
(let ((passepartout.gateway-tui::*incoming-msgs* nil)
|
||||
(passepartout.gateway-tui::*input-buffer* (make-array 5 :element-type 'character :initial-contents "hello" :fill-pointer 5 :adjustable t))
|
||||
(mock-stream (make-string-output-stream)))
|
||||
(close mock-stream)
|
||||
(passepartout.gateway-tui::handle-return mock-stream)
|
||||
(fiveam:is (member "ERROR: Connection to daemon lost." passepartout.gateway-tui::*incoming-msgs* :test #'string=))))
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user