add options for ->html function
parent
6c686447f9
commit
da80ecb010
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,12 @@
|
||||
#lang racket/base
|
||||
(require rackunit)
|
||||
(require "../template.rkt")
|
||||
|
||||
(define x '(root (p "hello")))
|
||||
|
||||
(check-equal? (->html x) "<root><p>hello</p></root>")
|
||||
(check-equal? (->html #:tag 'brennan x) "<brennan><p>hello</p></brennan>")
|
||||
(check-equal? (->html #:attrs '((id "dale")) x) "<root id=\"dale\"><p>hello</p></root>")
|
||||
(check-equal? (->html #:splice #t x) "<p>hello</p>")
|
||||
(check-equal? (->html #:tag 'brennan #:attrs '((id "dale")) x) "<brennan id=\"dale\"><p>hello</p></brennan>")
|
||||
(check-equal? (->html #:tag 'brennan #:attrs '((id "dale")) #:splice #t x) "<p>hello</p>")
|
Loading…
Reference in New Issue