;; 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)