|
|
|
@ -19,3 +19,24 @@
|
|
|
|
|
(check-equal? (->html #:splice #t x) "hello")
|
|
|
|
|
(check-equal? (->html #:tag 'brennan #:attrs '((id "dale")) x) "<brennan id=\"dale\">hello</brennan>")
|
|
|
|
|
(check-equal? (->html #:tag 'brennan #:attrs '((id "dale")) #:splice #t x) "hello")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(check-equal? (select 'key '#hash((key . "value"))) "value")
|
|
|
|
|
(check-false (select 'absent-key '#hash((key . "value"))))
|
|
|
|
|
|
|
|
|
|
(let ([metas '#hash((key . "value"))])
|
|
|
|
|
(check-equal? (select 'key metas) "value")
|
|
|
|
|
(check-false (select 'absent-key metas))
|
|
|
|
|
(check-equal? (select-from-metas 'key metas) "value")
|
|
|
|
|
(check-false (select-from-metas 'absent-key metas)))
|
|
|
|
|
|
|
|
|
|
(check-equal? (select 'key '(root (key "value"))) "value")
|
|
|
|
|
(check-false (select 'absent-key '(root (key "value"))))
|
|
|
|
|
(check-equal? (select-from-doc 'key '(root (key "value"))) '("value"))
|
|
|
|
|
(check-false (select-from-doc 'absent-key '(root (key "value"))))
|
|
|
|
|
|
|
|
|
|
(let ([doc '(root (key "value"))])
|
|
|
|
|
(check-equal? (select 'key doc) "value")
|
|
|
|
|
(check-false (select 'absent-key doc))
|
|
|
|
|
(check-equal? (select-from-doc 'key doc) '("value"))
|
|
|
|
|
(check-false (select-from-doc 'absent-key doc)))
|
|
|
|
|