#
# 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 {
Entity and special character test
The following list shows each entity of HTML 3.2 in four
formats: (1) the name, (2) as &entity;, (3) as {, and
(4) as a raw UTF-8 or Ascii character.
- quot " " "
- amp & & &
- lt < < <
- gt > > >
- nbsp
- iexcl ¡ ¡ ¡
- cent ¢ ¢ ¢
- pound £ £ £
- curren ¤ ¤ ¤
- yen ¥ ¥ ¥
- brvbar ¦ ¦ ¦
- sect § § §
- uml ¨ ¨ ¨
- copy © © ©
- ordf ª ª ª
- laquo « « «
- not ¬ ¬ ¬
- shy
- reg ® ® ®
- macr ¯ ¯ ¯
- deg ° ° °
- plusmn ± ± ±
- sup2 ² ² ²
- sup3 ³ ³ ³
- acute ´ ´ ´
- micro µ µ µ
- para ¶ ¶ ¶
- middot · · ·
- cedil ¸ ¸ ¸
- sup1 ¹ ¹ ¹
- ordm º º º
- raquo » » »
- frac14 ¼ ¼ ¼
- frac12 ½ ½ ½
- frac34 ¾ ¾ ¾
- iquest ¿ ¿ ¿
- Agrave À À À
- Aacute Á Á Á
- Acirc   Â
- Atilde à à Ã
- Auml Ä Ä Ä
- Aring Å Å Å
- AElig Æ Æ Æ
- Ccedil Ç Ç Ç
- Egrave È È È
- Eacute É É É
- Ecirc Ê Ê Ê
- Euml Ë Ë Ë
- Igrave Ì Ì Ì
- Iacute Í Í Í
- Icirc Î Î Î
- Iuml Ï Ï Ï
- ETH Ð Ð Ð
- Ntilde Ñ Ñ Ñ
- Ograve Ò Ò Ò
- Oacute Ó Ó Ó
- Ocirc Ô Ô Ô
- Otilde Õ Õ Õ
- Ouml Ö Ö Ö
- times × × ×
- Oslash Ø Ø Ø
- Ugrave Ù Ù Ù
- Uacute Ú Ú Ú
- Ucirc Û Û Û
- Uuml Ü Ü Ü
- Yacute Ý Ý Ý
- THORN Þ Þ Þ
- szlig ß ß ß
- agrave à à à
- aacute á á á
- acirc â â â
- atilde ã ã ã
- auml ä ä ä
- aring å å å
- aelig æ æ æ
- ccedil ç ç ç
- egrave è è è
- eacute é é é
- ecirc ê ê ê
- euml ë ë ë
- igrave ì ì ì
- iacute í í í
- icirc î î î
- iuml ï ï ï
- eth ð ð ð
- ntilde ñ ñ ñ
- ograve ò ò ò
- oacute ó ó ó
- ocirc ô ô ô
- otilde õ õ õ
- ouml ö ö ö
- divide ÷ ÷ ÷
- oslash ø ø ø
- ugrave ù ù ù
- uacute ú ú ú
- ucirc û û û
- uuml ü ü ü
- yacute ý ý ý
- thorn þ þ þ
- yuml ÿ ÿ ÿ
}
::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 {
A test of subscripting and superscripting
Here is subscript. And now superscript.
Here is subsubscript.
And now supersuperscript.
Here is subsuperscript
}
::tcltest::user-result
} {0 pass}
::tcltest::test html-1.2 {
Verify stylistic markup.
} {
set h [tkhtml_test_widget]
$h clear
$h parse {
A test of font changing markup
This is normal text
<b>: bold text
<big>: big text
<cite>: cite text
<code>: code text
<em>: emphasized text
<i>: italic text
<kbd>: keyboard text
<s>: strike-thru text
<samp>: sample text
<small>: small text
<strike>: strike-thru text
<strong>: strong text
<tt>: teletype text
<u>: underlined text
<var>: variable text
This is normal text
}
::tcltest::user-result
} {0 pass}