# # dehtmlify.test -- # nca-073-9 # # Copyright (c) 1996-2000 by Netcetera AG. # Copyright (c) 2001 by Apache Software Foundation. # All rights reserved. # # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # @(#) $Id$ # #----------------------------------------------------------------------- # tcltest package if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import ::tcltest::* } #----------------------------------------------------------------------- # errors test dehtmlify-1.1 {missing string} { catch {web::dehtmlify} msg set msg } {wrong # args: should be "web::dehtmlify string"} test dehtmlify-1.2 {too many args} { catch {web::dehtmlify "a" "b"} msg set msg } {wrong # args: should be "web::dehtmlify string"} #----------------------------------------------------------------------- # normal operation test dehtmlify-2.1 {test numeric entities} { web::dehtmlify " !"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" } " !\"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" test dehtmlify-2.2 {test symbolic entities} { web::dehtmlify ""&<> ¡¢£¤¥¦§¨©ª«¬®¯&hibar;°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" } "\"&<> \xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" test dehtmlify-2.3 {simple text with  } { web::dehtmlify "some text" } "some text" test dehtmlify-2.4 {test invalid entities} { web::dehtmlify "&Amp; >&UUML;" } {&Amp; >&UUML;} test dehtmlify-2.5 {test tags} { web::dehtmlify "
some text
"
} {some text}
test dehtmlify-2.6 {test nested tags} {
web::dehtmlify {
test }
} {testbold\">ing}
test dehtmlify-2.7 {comments} {
web::dehtmlify { testing and more }
} {testing and more}
test dehtmlify-2.8 {test unclosed tag} {
web::dehtmlify " test
"
} {thisisastrangetag>test}
test dehtmlify-2.10 {strange nesting} {} {
web::dehtmlify "text