factor/contrib/httpd/test/html.factor

54 lines
955 B
Factor
Raw Permalink Normal View History

IN: temporary
2006-01-23 18:01:46 -05:00
USING: html http io kernel namespaces styles test xml ;
[
"/responder/foo?z=%20"
2006-01-23 18:01:46 -05:00
] [
"/responder/foo" H{ { "z" " " } } build-url
] unit-test
2004-07-16 02:26:21 -04:00
[
"<html>&'sgml'"
2004-08-04 03:12:55 -04:00
] [ "<html>&'sgml'" chars>entities ] unit-test
2004-07-16 02:26:21 -04:00
[ "/foo/bar" ]
2004-08-30 20:24:19 -04:00
[
[
"/home/slava/doc/" "doc-root" set
"/home/slava/doc/foo/bar" file-link-href
] with-scope
] unit-test
[ "" ]
[
[
2005-11-29 23:49:59 -05:00
H{ } [ drop ] span-tag
] string-out
] unit-test
: html-format ( string style -- string )
[ format ] with-html-stream ;
2004-11-28 21:56:58 -05:00
[ "hello world" ]
[
2005-11-29 23:49:59 -05:00
[ "hello world" H{ } html-format ] string-out
] unit-test
2006-01-20 04:58:12 -05:00
[ "<span style='font-family: monospace; '>car</span>" ]
2005-11-29 23:49:59 -05:00
[
[
"car"
H{ { font "monospace" } }
2005-11-29 23:49:59 -05:00
html-format
] string-out
] unit-test
2005-11-29 23:49:59 -05:00
[ "<span style='color: #ff00ff; '>car</span>" ]
[
[
"car"
2005-11-29 23:49:59 -05:00
H{ { foreground { 1 0 1 1 } } }
html-format
] string-out
] unit-test