summaryrefslogtreecommitdiffstats
path: root/tkhtml1/tests/html1.test
blob: 043113a48f16d82d81380acbb9681eff282750ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#
# Test script for the Tk HTML widget
#
wm withdraw .
if {[lsearch [namespace children] ::tcltest] == -1} {
  source [file dirname $argv0]/engine.tcl
  namespace import ::tcltest::*
}

::tcltest::test html-1.0 {
  Verify that all of the entites are displayed correctly.
} {
  set h [tkhtml_test_widget]
  $h clear
  $h parse {
<html>
<h1>Entity and special character test</h1>
<p>The following list shows each entity of HTML 3.2 in four
formats: (1) the name, (2) as &amp;entity;, (3) as &amp;#123;, and
(4) as a raw UTF-8 or Ascii character.</p>
<ul>
<li> quot &quot; &#34; " </li>
<li> amp &amp; &#38; & </li>
<li> lt &lt; &#60; < </li>
<li> gt &gt; &#62; > </li>
<li> nbsp &nbsp; &#32;  </li>
<li> iexcl &iexcl; &#161; ¡ </li>
<li> cent &cent; &#162; ¢ </li>
<li> pound &pound; &#163; £ </li>
<li> curren &curren; &#164; ¤ </li>
<li> yen &yen; &#165; ¥ </li>
<li> brvbar &brvbar; &#166; ¦ </li>
<li> sect &sect; &#167; § </li>
<li> uml &uml; &#168; ¨ </li>
<li> copy &copy; &#169; © </li>
<li> ordf &ordf; &#170; ª </li>
<li> laquo &laquo; &#171; « </li>
<li> not &not; &#172; ¬ </li>
<li> shy &shy; &#173; ­ </li>
<li> reg &reg; &#174; ® </li>
<li> macr &macr; &#175; ¯ </li>
<li> deg &deg; &#176; ° </li>
<li> plusmn &plusmn; &#177; ± </li>
<li> sup2 &sup2; &#178; ² </li>
<li> sup3 &sup3; &#179; ³ </li>
<li> acute &acute; &#180; ´ </li>
<li> micro &micro; &#181; µ </li>
<li> para &para; &#182; ¶ </li>
<li> middot &middot; &#183; · </li>
<li> cedil &cedil; &#184; ¸ </li>
<li> sup1 &sup1; &#185; ¹ </li>
<li> ordm &ordm; &#186; º </li>
<li> raquo &raquo; &#187; » </li>
<li> frac14 &frac14; &#188; ¼ </li>
<li> frac12 &frac12; &#189; ½ </li>
<li> frac34 &frac34; &#190; ¾ </li>
<li> iquest &iquest; &#191; ¿ </li>
<li> Agrave &Agrave; &#192; À </li>
<li> Aacute &Aacute; &#193; Á </li>
<li> Acirc &Acirc; &#194; Â </li>
<li> Atilde &Atilde; &#195; Ã </li>
<li> Auml &Auml; &#196; Ä </li>
<li> Aring &Aring; &#197; Å </li>
<li> AElig &AElig; &#198; Æ </li>
<li> Ccedil &Ccedil; &#199; Ç </li>
<li> Egrave &Egrave; &#200; È </li>
<li> Eacute &Eacute; &#201; É </li>
<li> Ecirc &Ecirc; &#202; Ê </li>
<li> Euml &Euml; &#203; Ë </li>
<li> Igrave &Igrave; &#204; Ì </li>
<li> Iacute &Iacute; &#205; Í </li>
<li> Icirc &Icirc; &#206; Î </li>
<li> Iuml &Iuml; &#207; Ï </li>
<li> ETH &ETH; &#208; Ð </li>
<li> Ntilde &Ntilde; &#209; Ñ </li>
<li> Ograve &Ograve; &#210; Ò </li>
<li> Oacute &Oacute; &#211; Ó </li>
<li> Ocirc &Ocirc; &#212; Ô </li>
<li> Otilde &Otilde; &#213; Õ </li>
<li> Ouml &Ouml; &#214; Ö </li>
<li> times &times; &#215; × </li>
<li> Oslash &Oslash; &#216; Ø </li>
<li> Ugrave &Ugrave; &#217; Ù </li>
<li> Uacute &Uacute; &#218; Ú </li>
<li> Ucirc &Ucirc; &#219; Û </li>
<li> Uuml &Uuml; &#220; Ü </li>
<li> Yacute &Yacute; &#221; Ý </li>
<li> THORN &THORN; &#222; Þ </li>
<li> szlig &szlig; &#223; ß </li>
<li> agrave &agrave; &#224; à </li>
<li> aacute &aacute; &#225; á </li>
<li> acirc &acirc; &#226; â </li>
<li> atilde &atilde; &#227; ã </li>
<li> auml &auml; &#228; ä </li>
<li> aring &aring; &#229; å </li>
<li> aelig &aelig; &#230; æ </li>
<li> ccedil &ccedil; &#231; ç </li>
<li> egrave &egrave; &#232; è </li>
<li> eacute &eacute; &#233; é </li>
<li> ecirc &ecirc; &#234; ê </li>
<li> euml &euml; &#235; ë </li>
<li> igrave &igrave; &#236; ì </li>
<li> iacute &iacute; &#237; í </li>
<li> icirc &icirc; &#238; î </li>
<li> iuml &iuml; &#239; ï </li>
<li> eth &eth; &#240; ð </li>
<li> ntilde &ntilde; &#241; ñ </li>
<li> ograve &ograve; &#242; ò </li>
<li> oacute &oacute; &#243; ó </li>
<li> ocirc &ocirc; &#244; ô </li>
<li> otilde &otilde; &#245; õ </li>
<li> ouml &ouml; &#246; ö </li>
<li> divide &divide; &#247; ÷ </li>
<li> oslash &oslash; &#248; ø </li>
<li> ugrave &ugrave; &#249; ù </li>
<li> uacute &uacute; &#250; ú </li>
<li> ucirc &ucirc; &#251; û </li>
<li> uuml &uuml; &#252; ü </li>
<li> yacute &yacute; &#253; ý </li>
<li> thorn &thorn; &#254; þ </li>
<li> yuml &yuml; &#255; ÿ </li>
</ul>
</html>
}
  ::tcltest::user-result
} {0 pass}

::tcltest::test html-1.1 {
  Verify that all subscripting and superscripting works.
} {
  set h [tkhtml_test_widget]
  $h clear
  $h parse {
<html>
<body>
<h1>A test of subscripting and superscripting</h1>

<p>Here is sub<sub>script</sub>.  And now super<sup>script</sup>.</p>
<p>Here is sub<sub>sub<sub>script</sub></sub>.
   And now super<sup>super<sup>script</sup></sup>.</p>

<p>Here is sub<sub>super<sup>script</sup></sub></p>

</body>
</html>
}
  ::tcltest::user-result
} {0 pass}

::tcltest::test html-1.2 {
  Verify stylistic markup.
} {
  set h [tkhtml_test_widget]
  $h clear
  $h parse {
<html>
<body>
<h1>A test of font changing markup</h1>

<p>This is normal text</p>
<p>&lt;b&gt;: <b>bold text</b></p>
<p>&lt;big&gt;: <big>big text</big></p>
<p>&lt;cite&gt;: <cite>cite text</cite></p>
<p>&lt;code&gt;: <code>code text</code></p>
<p>&lt;em&gt;: <em>emphasized text</em></p>
<p>&lt;i&gt;: <i>italic text</i></p>
<p>&lt;kbd&gt;: <kbd>keyboard text</kbd></p>
<p>&lt;s&gt;: <s>strike-thru text</s></p>
<p>&lt;samp&gt;: <samp>sample text</samp></p>
<p>&lt;small&gt;: <small>small text</small></p>
<p>&lt;strike&gt;: <strike>strike-thru text</strike></p>
<p>&lt;strong&gt;: <strong>strong text</strong></p>
<p>&lt;tt&gt;: <tt>teletype text</tt></p>
<p>&lt;u&gt;: <u>underlined text</u></p>
<p>&lt;var&gt;: <var>variable text</var></p>
<p>This is normal text</p>
</body>
</html>
}
  ::tcltest::user-result
} {0 pass}