2008-03-06 14:54:15 -05:00
|
|
|
USING: io io.files io.streams.string io.encodings.utf8
|
2008-03-08 03:51:26 -05:00
|
|
|
http.server.templating.fhtml kernel tools.test sequences
|
|
|
|
parser ;
|
2008-03-05 22:38:15 -05:00
|
|
|
IN: http.server.templating.fhtml.tests
|
2007-09-20 18:09:08 -04:00
|
|
|
|
|
|
|
: test-template ( path -- ? )
|
2008-03-11 04:39:09 -04:00
|
|
|
"resource:extra/http/server/templating/fhtml/test/"
|
2008-03-19 20:15:32 -04:00
|
|
|
prepend
|
2007-09-20 18:09:08 -04:00
|
|
|
[
|
2008-03-11 04:39:09 -04:00
|
|
|
".fhtml" append [ run-template ] with-string-writer
|
2007-09-20 18:09:08 -04:00
|
|
|
] keep
|
2008-03-11 04:39:09 -04:00
|
|
|
".html" append ?resource-path utf8 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
|
|
|
|
|
2008-03-08 03:51:26 -05:00
|
|
|
[
|
|
|
|
[ ] [ "<%\n%>" parse-template drop ] unit-test
|
|
|
|
] with-file-vocabs
|