File: html1.test

package info (click to toggle)
tk-html3 3.0~fossil20110109-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,644 kB
  • ctags: 5,882
  • sloc: ansic: 48,994; tcl: 26,030; sh: 1,190; yacc: 161; makefile: 24
file content (181 lines) | stat: -rw-r--r-- 5,412 bytes parent folder | download | duplicates (10)
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}