add sextest test runner

A tool for testing Sex programs. Details in tools/sextest/README.org
This commit is contained in:
2026-05-15 19:49:48 +03:00
parent b157315e3d
commit c678df7978
6 changed files with 227 additions and 16 deletions

View File

@@ -19,21 +19,8 @@
(define (read-from-file file)
(with-directory file
(with-input-from-file (pathname-strip-directory file)
(fn (read-forms (list))))))
(define (read-bracket port)
(let loop ((c (read-char port))
(str (string)))
(cond ((char=? c #\])
(cons '¤
(with-input-from-string str
(fn (port-map identity read)))))
((char=? c #\[)
(loop port (conc )))
(else
(loop (read-char port)
(conc str c))))))
(with-input-from-file (pathname-strip-directory file)
(fn (read-forms (list))))))
(define open-bracket-counter (make-parameter 0))