test `current-metas`

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

@ -1,4 +1,5 @@
#lang racket/base
(require racket/string pollen/core)
;; This will prevent tests from littering their directory
;; with pollen-cache files.
@ -6,3 +7,9 @@
(provide (all-defined-out))
(define compile-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