(require-extension test qwiki-sxml sxml-transforms svnwiki-sxml) ;; From sxml-fu (define (output-xml tree rulesets) (SRV:send-reply (fold (lambda (ruleset tree) (pre-post-order* tree ruleset)) tree rulesets))) (test-begin "qwiki") (for-each (lambda (name) (let* ((source (string-append (->string name) ".wiki")) (content (call-with-input-file source svnwiki->sxml))) (with-output-to-file (string-append (->string name) ".sxml") (lambda () (pp `(wiki-page ,content)))) (with-output-to-file (string-append (->string name) ".html") (lambda () (output-xml `(wiki-page (Header (read-only)) (body (wiki-content ,content))) (qwiki-html-transformation-rules content)))) ;; The LaTeX rules are broken. Since we aren't using those in the wiki ;; disable the test for now. Eventually we should either resurrect ;; multidoc, write a replacement for it, or drop all non-html support. #; (with-output-to-file (string-append (->string name) ".tex") (lambda () (output-xml `(wiki-page ,content) (qwiki-LaTeX-transformation-rules content)))) (with-output-to-file (string-append (->string name) ".texi") (lambda () (output-xml `(wiki-page ,content) (qwiki-Texinfo-transformation-rules content)))) )) `(simple bb defstruct index one opengl )) (test-end) (unless (zero? (test-failure-count)) (exit 1))