2004-07-16 02:26:21 -04:00
|
|
|
IN: scratchpad
|
|
|
|
USE: html
|
|
|
|
USE: namespaces
|
|
|
|
USE: stdio
|
|
|
|
USE: streams
|
|
|
|
USE: strings
|
|
|
|
USE: test
|
2004-12-10 19:29:07 -05:00
|
|
|
USE: kernel
|
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
|
|
|
|
2004-09-26 21:34:25 -04:00
|
|
|
[ "<img src='/responder/resource/library/icons/File.png'>" ]
|
2004-09-02 19:38:05 -04:00
|
|
|
[
|
|
|
|
[
|
|
|
|
""
|
2005-01-13 19:49:47 -05:00
|
|
|
[ [[ "icon" "library/icons/File.png" ]] ]
|
2004-09-02 19:38:05 -04:00
|
|
|
[ drop ] icon-tag
|
|
|
|
] with-string
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ "" ]
|
|
|
|
[
|
|
|
|
[
|
|
|
|
[ ] [ drop ] span-tag
|
|
|
|
] with-string
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ "<span style='color: #ff00ff; font-family: Monospaced; '>car</span>" ]
|
|
|
|
[
|
|
|
|
[
|
2005-01-13 19:49:47 -05:00
|
|
|
[ [ "fg" 255 0 255 ] [[ "font" "Monospaced" ]] ]
|
2004-09-02 19:38:05 -04:00
|
|
|
[ drop "car" write ]
|
|
|
|
span-tag
|
|
|
|
] with-string
|
|
|
|
] unit-test
|
|
|
|
|
2004-11-28 21:56:58 -05:00
|
|
|
: html-write-attr ( string style -- string )
|
|
|
|
[ write-attr ] with-html-stream ;
|
|
|
|
|
2004-09-02 19:38:05 -04:00
|
|
|
[ "hello world" ]
|
|
|
|
[
|
|
|
|
[ "hello world" [ ] html-write-attr ] with-string
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ "<span style='color: #ff00ff; font-family: Monospaced; '>car</span>" ]
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"car"
|
2005-01-13 19:49:47 -05:00
|
|
|
[ [ "fg" 255 0 255 ] [[ "font" "Monospaced" ]] ]
|
2004-09-02 19:38:05 -04:00
|
|
|
html-write-attr
|
|
|
|
] with-string
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
"<html><head><title>Foo</title></head><body><h1>Foo</h1></body></html>"
|
|
|
|
] [
|
|
|
|
[
|
|
|
|
"Foo" [ ] html-document
|
|
|
|
] with-string
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[
|
|
|
|
"<html><head><title>Foo</title></head><body><h1>Foo</h1><pre>Hi</pre></body></html>"
|
|
|
|
] [
|
|
|
|
[
|
|
|
|
"Foo" [ "Hi" write ] simple-html-document
|
|
|
|
] with-string
|
|
|
|
] unit-test
|