factor/extra/http/server/templating/fhtml/fhtml-tests.factor

18 lines
555 B
Factor
Raw Normal View History

2008-03-05 22:38:15 -05:00
USING: io io.files io.streams.string
http.server.templating.fhtml kernel tools.test sequences ;
IN: http.server.templating.fhtml.tests
2007-09-20 18:09:08 -04:00
: test-template ( path -- ? )
2008-03-05 22:38:15 -05:00
"extra/http/server/templating/fhtml/test/" swap append
2007-09-20 18:09:08 -04:00
[
".fhtml" append resource-path
[ run-template-file ] with-string-writer
2007-09-20 18:09:08 -04:00
] keep
".html" append resource-path file-contents = ;
2007-09-20 18:09:08 -04:00
[ t ] [ "example" test-template ] unit-test
[ t ] [ "bug" test-template ] unit-test
[ t ] [ "stack" test-template ] unit-test
[ ] [ "<%\n%>" parse-template drop ] unit-test