From bad71c4e6c4c29d4ffe7a6e470c911a08b927460 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 9 Jun 2019 13:21:24 -0700 Subject: [PATCH] write test files --- quad/.gitignore | 2 +- quad/qtest/all.rkt | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/quad/.gitignore b/quad/.gitignore index f9820a39..218e6234 100644 --- a/quad/.gitignore +++ b/quad/.gitignore @@ -29,4 +29,4 @@ quad/scribblings/scribble.css quad/scribblings/pict*.png quad/scribblings/mb.css *.pdf -!test*.pdf +!*tester.pdf diff --git a/quad/qtest/all.rkt b/quad/qtest/all.rkt index 609d9673..dac4223f 100644 --- a/quad/qtest/all.rkt +++ b/quad/qtest/all.rkt @@ -17,15 +17,17 @@ (define-syntax (test-each stx) (syntax-case stx () [(_) #'(begin)] - [(_ PATH . REST) - (with-syntax ([PDF-NAME (test-pdf-name (syntax-e #'PATH))]) + [(_ MOD-PATH . REST) + (with-syntax ([PDF-NAME (test-pdf-name (syntax-e #'MOD-PATH))]) #'(begin - (define-runtime-path path-to-test PATH) + (define-runtime-path path-to-test MOD-PATH) (define-runtime-path test-base PDF-NAME) - (println PATH) + (println MOD-PATH) + (define-runtime-path path (path-replace-extension MOD-PATH #".pdf")) (check-pdfs-equal? (time (parameterize ([quadwriter-test-mode #t] [current-output-port (open-output-nowhere)]) - (render-pdf (dynamic-require path-to-test 'doc) #f))) test-base) + (render-pdf (dynamic-require path-to-test 'doc) path) + path)) test-base) (test-each . REST)))])) (test-each "test-docs.rkt"