summaryrefslogtreecommitdiffstats
path: root/tkhtml1/tests/html1.test
diff options
context:
space:
mode:
Diffstat (limited to 'tkhtml1/tests/html1.test')
-rw-r--r--tkhtml1/tests/html1.test181
1 files changed, 181 insertions, 0 deletions
diff --git a/tkhtml1/tests/html1.test b/tkhtml1/tests/html1.test
new file mode 100644
index 0000000..043113a
--- /dev/null
+++ b/tkhtml1/tests/html1.test
@@ -0,0 +1,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}