test `current-metas`

pull/169/head
Matthew Butterick 7 years ago
parent 33c7c79cc3
commit d5a8ffabcc

@ -1,8 +1,15 @@
#lang racket/base #lang racket/base
(require racket/string pollen/core)
;; This will prevent tests from littering their directory ;; This will prevent tests from littering their directory
;; with pollen-cache files. ;; with pollen-cache files.
(module setup racket/base (module setup racket/base
(provide (all-defined-out)) (provide (all-defined-out))
(define compile-cache-active #f) (define compile-cache-active #f)
(define render-cache-active #f)) (define render-cache-active #f))
(provide test-current-metas)
(define (test-current-metas)
(if (current-metas)
(string-join (sort (map symbol->string (hash-keys (current-metas))) string<?) " ")
"false"))

@ -0,0 +1,3 @@
#lang racket/base
(require pollen/core "pollen.rkt" rackunit)
(check-equal? (test-current-metas) "false")

@ -0,0 +1,5 @@
#lang pollen
(require rackunit)
(define-meta foo "bar")
(check-equal? (test-current-metas) "foo here-path zim")
(define-meta zim "zam")
Loading…
Cancel
Save