fix: input timeout bugs — read-raw-byte, SS3, parse-csi-params all use sub-second timeouts now (get-internal-real-time replaces get-universal-time which truncated to integer seconds)
This commit is contained in:
24
scripts/find-t-warning.lisp
Normal file
24
scripts/find-t-warning.lisp
Normal file
@@ -0,0 +1,24 @@
|
||||
;; Binary search for "function T" warning in input.lisp
|
||||
(load "~/quicklisp/setup.lisp")
|
||||
(ql:register-local-projects)
|
||||
(ql:quickload :cl-tty :silent t)
|
||||
|
||||
(defun test-subset (name from to)
|
||||
(format t "~&=== Testing ~a (lines ~d-~d) ===~%" name from to)
|
||||
(with-open-file (s "src/components/input.lisp")
|
||||
(loop repeat (1- from) do (read-line s nil))
|
||||
(loop with code = (make-string 0 :element-type 'character :adjustable t :fill-pointer t)
|
||||
for i from from to to
|
||||
for line = (read-line s nil nil)
|
||||
while line
|
||||
do (vector-push-extend #\Newline code)
|
||||
(dotimes (j (length line)) (vector-push-extend (char line j) code))
|
||||
finally (handler-bind ((warning (lambda (c)
|
||||
(format t " WARNING: ~a~%" c)
|
||||
(muffle-warning c))))
|
||||
(let ((*readtable* *readtable*)
|
||||
(*package* (find-package :cl-tty.input)))
|
||||
(eval (read-from-string (coerce code 'string))))))))
|
||||
|
||||
;; Test the DEFMETHOD READ-EVENT section specifically (lines 321-327)
|
||||
(test-subset "last-form" 321 327)
|
||||
Reference in New Issue
Block a user