Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Asciify string.test. tcltest::fileEncoding is thus no longer necessary (which would have performance effect for _all_ testcases) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core-8-6-branch |
Files: | files | file ages | folders |
SHA3-256: |
03cf62003a88a5f22292d0891a44e331 |
User & Date: | jan.nijtmans 2024-03-28 21:12:46 |
References
2024-03-28
| ||
22:12 | • Ticket [edb4b065f4] Crash in string compare of empty string against byte array status still Closed with 5 other changes artifact: 718cb197a4 user: sebres | |
Context
2024-03-29
| ||
13:20 | Remove libtommath/makefile* and related: Those files suggest anything can be built in this directory... check-in: 51953c6e81 user: jan.nijtmans tags: core-8-6-branch | |
2024-03-28
| ||
21:39 | Merge 8.6 check-in: a358975f05 user: jan.nijtmans tags: core-8-branch | |
21:12 | Asciify string.test. tcltest::fileEncoding is thus no longer necessary (which would have performance... check-in: 03cf62003a user: jan.nijtmans tags: core-8-6-branch | |
2024-03-27
| ||
20:09 | tests renumeration check-in: 29223eb238 user: sebres tags: core-8-6-branch | |
Changes
Changes to library/tcltest/tcltest.tcl.
︙ | ︙ | |||
2840 2841 2842 2843 2844 2845 2846 | if {[llength $matchDirs] == 0} { DebugPuts 1 "No test directories remain after applying match\ and skip patterns!" } return [lsort $matchDirs] } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 | if {[llength $matchDirs] == 0} { DebugPuts 1 "No test directories remain after applying match\ and skip patterns!" } return [lsort $matchDirs] } # tcltest::runAllTests -- # # prints output and sources test files according to the match and # skip patterns provided. after sourcing test files, it goes on # to source all.tcl files in matching test subdirectories. # # Arguments: |
︙ | ︙ | |||
2959 2960 2961 2962 2963 2964 2965 | # Run each of the specified tests foreach file [lsort [GetMatchingFiles]] { set tail [file tail $file] puts [outputChannel] $tail flush [outputChannel] | < < < | | 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 | # Run each of the specified tests foreach file [lsort [GetMatchingFiles]] { set tail [file tail $file] puts [outputChannel] $tail flush [outputChannel] if {[singleProcess]} { if {[catch { incr numTestFiles uplevel 1 [list ::source $file] } msg]} { puts [outputChannel] "Test file error: $msg" # append the name of the test to a list to be reported # later lappend testFileFailures $file } if {$numTests(Failed) > 0} { |
︙ | ︙ | |||
2989 2990 2991 2992 2993 2994 2995 | set value [Configure $opt] # Don't bother passing default configuration options if {$value eq $DefaultValue($opt)} { continue } lappend childargv $opt $value } | | | 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 | set value [Configure $opt] # Don't bother passing default configuration options if {$value eq $DefaultValue($opt)} { continue } lappend childargv $opt $value } set cmd [linsert $childargv 0 | $shell $file] if {[catch { incr numTestFiles set pipeFd [open $cmd "r"] if {$fullutf} { fconfigure $pipeFd -profile tcl8 -encoding utf-8 } while {[gets $pipeFd line] >= 0} { |
︙ | ︙ |
Changes to tests/string.test.
|
| < < | 1 2 3 4 5 6 7 | # Commands covered: string # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # # Copyright (c) 1991-1993 The Regents of the University of California. |
︙ | ︙ | |||
250 251 252 253 254 255 256 | run {string equal -length 2 abcde abxyz} } 1 test string-3.15.$noComp {string equal with special index} { list [catch {run {string equal -length end-3 abcde abxyz}} msg] $msg } {1 {expected integer but got "end-3"}} test string-3.16.$noComp {string equal, unicode} { | | | | | | | | | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | run {string equal -length 2 abcde abxyz} } 1 test string-3.15.$noComp {string equal with special index} { list [catch {run {string equal -length end-3 abcde abxyz}} msg] $msg } {1 {expected integer but got "end-3"}} test string-3.16.$noComp {string equal, unicode} { run {string equal ab\u7266 ab\u7267} } 0 test string-3.17.$noComp {string equal, unicode} { run {string equal \xDC \xDC} } 1 test string-3.18.$noComp {string equal, unicode} { run {string equal \xDC \xFC} } 0 test string-3.19.$noComp {string equal, unicode} { run {string equal \xDC\xDC\xDC\xFC\xFC \xDC\xDC\xDC\xDC\xDC} } 0 test string-3.20.$noComp {string equal, high bit} { # This test fails if the underlying comparison # is using signed chars instead of unsigned chars. # (like SunOS's default memcmp thus the compat/memcmp.c) run {string equal "\x80" "@"} # Nb this tests works also in utf8 space because \x80 is # translated into a 2 or more bytelength but whose first byte has # the high bit set. } 0 test string-3.21.$noComp {string equal -nocase} { run {string equal -nocase abcde Abdef} } 0 test string-3.22.$noComp {string equal, -nocase unicode} { run {string equal -nocase \xDC \xDC} } 1 test string-3.23.$noComp {string equal, -nocase unicode} { run {string equal -nocase \xDC\xDC\xDC\xFC\xFC \xDC\xDC\xDC\xDC\xDC} } 1 test string-3.24.$noComp {string equal -nocase with length} { run {string equal -length 2 -nocase abcde Abxyz} } 1 test string-3.25.$noComp {string equal -nocase with length} { run {string equal -nocase -length 3 abcde Abxyz} } 0 test string-3.26.$noComp {string equal -nocase with length <= 0} { run {string equal -nocase -length -1 abcde AbCdEf} } 0 test string-3.27.$noComp {string equal -nocase with excessive length} { run {string equal -nocase -length 50 AbCdEf abcde} } 0 test string-3.28.$noComp {string equal -len unicode} { # These are strings that are 6 BYTELENGTH long, but the length # shouldn't make a different because there are actually 3 CHARS long run {string equal -len 5 \xDC\xDC\xDC \xDC\xDC\xFC} } 0 test string-3.29.$noComp {string equal -nocase with special index} { list [catch {run {string equal -nocase -length end-3 Abcde abxyz}} msg] $msg } {1 {expected integer but got "end-3"}} test string-3.30.$noComp {string equal, null strings} { run {string equal "" ""} } 1 |
︙ | ︙ |