output-template: run the tests

This commit is contained in:
Daniel Barlow
2025-03-02 21:09:11 +00:00
parent 6649ebeccd
commit c32d09bd83
4 changed files with 12 additions and 50 deletions

View File

@@ -41,4 +41,12 @@
out (substitute (: (io.input) :read "*a") opening closing)]
(io.write out)))
(import-macros { : define-tests : expect : expect= } :anoia.assert)
(define-tests
(fn slurp [name]
(with-open [f (assert (io.open name))] (f:read "*a")))
(expect=
(pick-values 1 (substitute (slurp "example.ini") "{{" "}}"))
(slurp "example.ini.expected")))
{ : run }