blob: 53dce1cb119496f451bdee93bb4a3d8c81518089 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
source testing.tcl
section "Regression Testing"
test regr-1.1 "Double dereference arrays" {
array set a {one ONE two TWO three THREE}
array set b {ONE 1 TWO 2 THREE 3}
set chan two
set b($a($chan))
} {2}
# Will assert on exit if the bug exists
test regr-1.2 "Reference count shared literals" {
proc a {} {
while {1} {break}
}
a
rename a ""
return 1
} {1}
section "I/O Testing"
test io-1.1 "Read last line with no newline" {
set lines 0
set f [open testio.in]
while {[gets $f buf] >= 0} {
incr lines
}
close $f
list $lines
} {2}
testreport
|