Changeset 1415 for trunk/lang/tcl
- Timestamp:
- Apr 21, 2009, 8:20:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lang/tcl/tests/encode.test
r1414 r1415 309 309 } {0 -hi} 310 310 311 test encode-4.0 {is binary (isxml) test with invalid XML characters} { 312 list [catch {Rappture::encoding::is binary "formfeed \f"} msg] $msg 313 } {0 yes} 314 test encode-4.1 {is binary (isxml) test with invalid XML characters} { 315 list [catch {Rappture::encoding::is binary "backspace \b"} msg] $msg 316 } {0 yes} 317 test encode-4.2 {is binary (isxml) test with invalid XML characters} { 318 list [catch {Rappture::encoding::is binary "vertical tab \v"} msg] $msg 319 } {0 yes} 320 test encode-4.3 {is binary (isxml) test with invalid XML characters} { 321 list [catch {Rappture::encoding::is binary "high-order bit \x80"} msg] $msg 322 } {0 yes} 323 test encode-4.4 {is binary (isxml) test with invalid XML characters} { 324 list [catch {Rappture::encoding::is binary "high-order bit \xFF"} msg] $msg 325 } {0 yes} 326 test encode-4.5 {is binary (isxml) test with invalid XML characters} { 327 list [catch {Rappture::encoding::is binary "NUL \0"} msg] $msg 328 } {0 yes} 329 test encode-4.6 {is binary (isxml) test with invalid XML characters} { 330 list [catch {Rappture::encoding::is binary "BEL \a"} msg] $msg 331 } {0 yes} 332 test encode-4.7 {is binary (isxml) test with valid XML characters} { 333 list [catch {Rappture::encoding::is binary "tab/cr/nl \t\r\n "} msg] $msg 334 } {0 no} 335 test encode-4.8 {is binary (isxml) test with valid XML characters} { 336 list [catch { 337 set string "\t\r\n" 338 for { set i 0x20 } { $i <= 0x7F } { incr i } { 339 append string [format %c $i] 340 } 341 Rappture::encoding::is binary $string 342 } msg] $msg 343 } {0 no} 344 345 test encode-4.8 {is binary (isxml) test with all characters} { 346 list [catch { 347 set result {} 348 for { set i 0 } { $i <= 0xFF } { incr i } { 349 set string [format %c $i] 350 if { ![Rappture::encoding::is binary $string] } { 351 lappend result $i 352 } 353 } 354 set result 355 } msg] $msg 356 } {0 {9 10 13 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}} 357 311 358 312 359 ::tcltest::cleanupTests
Note: See TracChangeset
for help on using the changeset viewer.