|
|
@ -1,5 +1,5 @@
|
|
|
|
#lang at-exp racket/base
|
|
|
|
#lang at-exp racket/base
|
|
|
|
(require rackunit racket/runtime-path pollen/render racket/file racket/system pollen/setup)
|
|
|
|
(require rackunit racket/runtime-path pollen/render racket/file racket/system pollen/setup txexpr xml)
|
|
|
|
|
|
|
|
|
|
|
|
;; define-runtime-path only allowed at top level
|
|
|
|
;; define-runtime-path only allowed at top level
|
|
|
|
(define-runtime-path poly-output-path-dir "data/poly-output-path")
|
|
|
|
(define-runtime-path poly-output-path-dir "data/poly-output-path")
|
|
|
@ -19,10 +19,11 @@
|
|
|
|
(check-equal? (file->string test.txt) "(root hello world)")
|
|
|
|
(check-equal? (file->string test.txt) "(root hello world)")
|
|
|
|
(delete-file test.txt)
|
|
|
|
(delete-file test.txt)
|
|
|
|
(check-false (file-exists? test.html))
|
|
|
|
(check-false (file-exists? test.html))
|
|
|
|
|
|
|
|
|
|
|
|
;; passing poly source as argument should result in default (html) rendering
|
|
|
|
;; passing poly source as argument should result in default (html) rendering
|
|
|
|
(render-batch #:parallel parallel? test.poly.pm)
|
|
|
|
(render-batch #:parallel parallel? test.poly.pm)
|
|
|
|
(check-equal? (file->string test.html) "<html><head><meta charset=\"UTF-8\"/></head><body><root>hello world</root></body></html>")
|
|
|
|
(check-txexprs-equal?
|
|
|
|
|
|
|
|
(string->xexpr (file->string test.html))
|
|
|
|
|
|
|
|
(string->xexpr "<html><head><meta charset=\"UTF-8\"/></head><body><root>hello world</root></body></html>"))
|
|
|
|
(delete-file test.html)
|
|
|
|
(delete-file test.html)
|
|
|
|
(check-false (file-exists? test.txt))))
|
|
|
|
(check-false (file-exists? test.txt))))
|
|
|
|
|
|
|
|
|
|
|
|