Color check output, gated by LISPLINGS_COLOR (wave 3, F3)

The exercise subprocess writes to a pipe in watch mode and cannot see the parent's terminal, so setup now sets LISPLINGS_COLOR=always/never and the harness colorizes its own report: green ok, red FAIL, bold summaries, red failure headers in exercise-runner.lisp.

Piped output stays ANSI-free unless forced: NO_COLOR and TERM=dumb are honored, and LISPLINGS_COLOR=always ./lisplings ... | cat -v forces codes for debugging. A (declaim (special *use-color*)) lets setup read the value without a compile-time warning.
This commit is contained in:
venomade committed 2026-11-22 09:50:52 +00:00
1 parent b62d32d995
commit 516b256ea3
4 files changed
+48 -8

No files matched your search

+6
View File
@@ -140,6 +140,12 @@ runs one exercise (`src/exercise-runner.lisp`).
dev/verify.sh # every exercise fails when broken, passes when solved
```
The watcher shows color only on a terminal, and turns it off for
`NO_COLOR` or `TERM=dumb`. The exercise subprocess writes to a pipe,
so it cannot detect the terminal itself: the watcher passes the
decision on as `LISPLINGS_COLOR=always` or `=never`. To debug piped
output, force it with `LISPLINGS_COLOR=always ./lisplings ... | cat -v`.
To add an exercise: write the broken `exercises/<chapter>/<name>.lisp`
and the solved `solutions/<chapter>/<name>.lisp`, add a `(:name ...
:dir ... :hint ...)` entry to `info.sexp`, and run `dev/verify.sh`.