(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") ;; TODO: This test doesn't really test anything except for that the ;; conversion process doesn't result in an error. Perhaps add ;; "expected" HTML files and test that the output doesn't differ? (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)))))) `(simple bb defstruct index one opengl)) (test-end) (test-exit)