]> gitweb.factorcode.org Git - factor.git/blob - library/test/html.factor
dcafde5cacd4c4081873236979db82894a2ef864
[factor.git] / library / test / html.factor
1 IN: scratchpad
2 USE: compiler
3 USE: html
4 USE: namespaces
5 USE: stdio
6 USE: streams
7 USE: strings
8 USE: test
9
10 [ [ 1 1 0 0 ] ] [ [ chars>entities ] ] [ balance>list ] test-word
11 [
12     "<html>&'sgml'"
13 ] [ "<html>&'sgml'" ] [ chars>entities ] test-word
14
15 [ [ 1 1 0 0 ] ] [ [ html-attr-string ] ] [ balance>list ] test-word
16
17 [ "Hello world" ]
18 [ "Hello world" <namespace> ]
19 [ [ html-attr-string ] bind ] test-word
20
21 [ "<b>Hello world</b>" ]
22 [ "Hello world" <namespace> [ t "bold" set ] extend ]
23 [ [ html-attr-string ] bind ] test-word
24
25 [ "<i>Hello world</i>" ]
26 [ "Hello world" <namespace> [ t "italics" set ] extend ]
27 [ [ html-attr-string ] bind ] test-word
28
29 [ "<font color=\"#ff00ff\">Hello world</font>" ]
30 [ "Hello world" <namespace> [ [ 255 0 255 ] "fg" set ] extend ]
31 [ [ html-attr-string ] bind ] test-word