You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pollen/test/test-poly.rkt

14 lines
661 B
Racket

#lang at-exp racket/base
(require rackunit pollen/world racket/runtime-path pollen/render)
;; define-runtime-path only allowed at top level
(define-runtime-path poly-dir "data/poly")
(define-runtime-path poly-source "data/poly/test.poly.pm")
(parameterize ([current-directory poly-dir]
[world:current-project-root poly-dir]
[current-output-port (open-output-string)])
(parameterize ([world:current-poly-target 'txt])
(check-equal? (render poly-source) "TITLE is **big**"))
(parameterize ([world:current-poly-target 'html])
(check-equal? (render poly-source) (format "~v" '(root (h2 "title") " is " (strong "big"))))))