2 # 27Jan2005 - SIGSEGV for bug on Jim_DuplicateObj().
4 for {set i
0} {$i < 100} {incr i
} {
11 # 29Jan2005 - SEGFAULT parsing script composed of just one comment.
16 # 29Jan2005 - "Error in Expression" with correct expression
22 # 29Jan2005 - SIGSEGV when run this code, due to expr's bug.
27 expr {[fibonacci
[expr {$x-1}]] + [fibonacci
[expr {$x-2}]]}
34 # 06Mar2005 - This looped forever...
35 for {set i
0} {$i < 10} {incr i
} {continue}
39 # 07Mar2005 - Unset create variable + dict is using dict syntax sugar at
40 # currently non-existing variable
41 catch {unset thisvardoesnotexists
(thiskeytoo
)}
42 if {[catch {set thisvardoesnotexists
}] == 0} {
43 puts "TEST 6 FAILED - unset created dict for non-existing variable"
49 # 04Nov2008 - variable parsing does not eat last brace
55 # 04Nov2008 - string toupper/tolower do not convert to string rep
56 string tolower
[list a
]
57 string toupper
[list a
]
61 # 04Nov2008 - crash on exit when replacing Tcl proc with C command.
62 # Requires the clock extension to be built as a loadable module.
64 catch {package require
clock}
65 # Note, crash on exit, so don't say we passed!
68 # 05Nov2008 - incorrect lazy expression evaluation with unary not
73 # 14 Feb 2010 - access static variable in deleted proc
74 proc a
{} {{x
1}} { rename a
""; incr x
}
79 # 13 Sep 2010 - reference with invalid tag
80 set a b
[ref value
"tag name"]
81 getref
[string range
$a 1 end
]
85 # 14 Sep 2010 - parse list with trailing backslash
86 set x
"switch -0 \$on \\"
91 # 14 Sep 2010 - command expands to nothing
96 # 24 Feb 2010 - bad reference counting of the stack trace in 'error'
98 tailcall
error $msg $stack
100 catch {fail
} msg opts
101 catch {a
$msg $opts(-errorinfo)}
104 # 24 Feb 2010 - rename the current proc
105 # Leaves unfreed objects on the stack
106 proc a
{} { rename a newa
}
110 # 26 Nov 2010 - crashes on invalid dict sugar
112 puts "TEST 17 PASSED"
115 # 12 Apr 2011 - crashes on unset for loop var
117 for {set i
0} {$i < 5} {incr i
} {unset i
}
119 puts "TEST 18 PASSED"
122 # 25 May 2011 - crashes with double colon
126 puts "TEST 19 PASSED"
129 # 26 May 2011 - infinite recursion
130 proc a
{} { global ::blah; set ::blah test
}
132 puts "TEST 20 PASSED"
135 # 26 May 2011 - infinite loop with null byte in subst
137 puts "TEST 21 PASSED"
140 # 21 June 2011 - crashes on lappend to to value with script rep
144 puts "TEST 22 PASSED"
147 # 27 July 2011 - unfreed objects on exit
153 # Actually, the test passes if no objects leaked on exit
154 puts "TEST 23 PASSED"
156 # TAKE THE FOLLOWING puts AS LAST LINE
158 puts "--- ALL TESTS PASSED ---"