fix(protocol): Skip leading whitespace in read-framed-message to prevent desync
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
This commit is contained in:
27
test-input.lisp
Normal file
27
test-input.lisp
Normal file
@@ -0,0 +1,27 @@
|
||||
(require :asdf)
|
||||
(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
|
||||
(ql:quickload :croatoan)
|
||||
(in-package :cl-user)
|
||||
(defun main ()
|
||||
(with-open-file (f "test-input.log" :direction :output :if-exists :supersede)
|
||||
(format f "Starting...~%")
|
||||
(finish-output f)
|
||||
(croatoan:with-screen (scr :input-echoing nil :input-blocking nil :cursor-visible t)
|
||||
(let* ((h (croatoan:height scr))
|
||||
(w (croatoan:width scr))
|
||||
(input-win (make-instance 'croatoan:window :height 1 :width w :position (list (- h 1) 0)))
|
||||
(buf (make-array 0 :element-type 'character :fill-pointer 0 :adjustable t)))
|
||||
(setf (croatoan:input-blocking input-win) nil)
|
||||
(loop
|
||||
(let ((ch (croatoan:get-char input-win)))
|
||||
(when ch
|
||||
(format f "Got: ~S~%" ch)
|
||||
(finish-output f)
|
||||
(return)))
|
||||
(croatoan:clear input-win)
|
||||
(croatoan:add-string input-win (concatenate 'string "> " (coerce buf 'string)))
|
||||
(croatoan:move input-win 0 (+ 2 (length buf)))
|
||||
(croatoan:refresh input-win)
|
||||
(sleep 0.05))))))
|
||||
(main)
|
||||
(sb-ext:exit)
|
||||
Reference in New Issue
Block a user