2005-03-28 23:45:13 -05:00
|
|
|
IN: temporary
|
2005-07-13 15:34:38 -04:00
|
|
|
USING: html io kernel namespaces styles 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
|
|
|
|
2004-10-04 23:58:53 -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
|
2004-09-02 19:38:05 -04:00
|
|
|
|
|
|
|
[ "" ]
|
|
|
|
[
|
|
|
|
[
|
|
|
|
[ ] [ drop ] span-tag
|
2005-06-19 18:53:58 -04:00
|
|
|
] string-out
|
2004-09-02 19:38:05 -04:00
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ "<span style='color: #ff00ff; font-family: Monospaced; '>car</span>" ]
|
|
|
|
[
|
|
|
|
[
|
2005-10-30 17:59:51 -05:00
|
|
|
[ [ foreground 1 0 1 ] [[ font "Monospaced" ]] ]
|
2004-09-02 19:38:05 -04:00
|
|
|
[ drop "car" write ]
|
|
|
|
span-tag
|
2005-06-19 18:53:58 -04:00
|
|
|
] string-out
|
2004-09-02 19:38:05 -04:00
|
|
|
] unit-test
|
|
|
|
|
2005-07-21 21:43:37 -04:00
|
|
|
: html-format ( string style -- string )
|
|
|
|
[ format ] with-html-stream ;
|
2004-11-28 21:56:58 -05:00
|
|
|
|
2004-09-02 19:38:05 -04:00
|
|
|
[ "hello world" ]
|
|
|
|
[
|
2005-07-21 21:43:37 -04:00
|
|
|
[ "hello world" [ ] html-format ] string-out
|
2004-09-02 19:38:05 -04:00
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ "<span style='color: #ff00ff; font-family: Monospaced; '>car</span>" ]
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"car"
|
2005-10-30 17:59:51 -05:00
|
|
|
[ [ foreground 1 0 1 ] [[ font "Monospaced" ]] ]
|
2005-07-21 21:43:37 -04:00
|
|
|
html-format
|
2005-06-19 18:53:58 -04:00
|
|
|
] string-out
|
2004-09-02 19:38:05 -04:00
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
"<html><head><title>Foo</title></head><body><h1>Foo</h1></body></html>"
|
|
|
|
] [
|
|
|
|
[
|
|
|
|
"Foo" [ ] html-document
|
2005-06-19 18:53:58 -04:00
|
|
|
] string-out
|
2004-09-02 19:38:05 -04:00
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
"<html><head><title>Foo</title></head><body><h1>Foo</h1><pre>Hi</pre></body></html>"
|
|
|
|
] [
|
|
|
|
[
|
|
|
|
"Foo" [ "Hi" write ] simple-html-document
|
2005-06-19 18:53:58 -04:00
|
|
|
] string-out
|
2004-09-02 19:38:05 -04:00
|
|
|
] unit-test
|