main
Matthew Butterick 5 years ago
parent 459ec3600b
commit babd03bd45

@ -1,14 +1,25 @@
#lang racket/base
(require racket/runtime-path)
(require racket/runtime-path
racket/match
quadwriter)
(provide (all-defined-out))
(define-runtime-path here ".")
(define (test-paths)
(define (find-test-paths)
(for/list ([test-path (in-directory here)]
#:when (regexp-match #rx"test-.*.rkt$" (path->string test-path)))
test-path))
test-path))
(define (test-pdf-name path)
(path-add-extension (path-replace-extension path #".pdf") #"" #"-tester."))
(path-add-extension (path-replace-extension path #".pdf") #"" #"-tester."))
(define (update-test-pdf test-path-arg)
(define test-path (match test-path-arg
[(? absolute-path? ap) ap]
[rp (build-path here rp)]))
(define-values (dir name _) (split-path test-path))
(displayln (path->string name))
(time (parameterize ([quadwriter-test-mode #t])
(render-pdf (dynamic-require test-path 'doc) (test-pdf-name test-path) test-path))))

@ -1,9 +1,4 @@
#lang racket/base
(require quadwriter
"paths-to-test.rkt")
(require quadwriter "paths-to-test.rkt")
(for ([test-path (in-list (test-paths))])
(define-values (dir name _) (split-path test-path))
(displayln (path->string name))
(time (parameterize ([quadwriter-test-mode #t])
(render-pdf (dynamic-require test-path 'doc) (test-pdf-name test-path) test-path))))
(for-each update-test-pdf (find-test-paths))

Loading…
Cancel
Save