Import Tcl 8.6.11
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
if {[lsearch [namespace children] ::tcltest] == -1} {
|
||||
package require tcltest
|
||||
if {"::tcltest" ni [namespace children]} {
|
||||
package require tcltest 2.5
|
||||
namespace import -force ::tcltest::*
|
||||
}
|
||||
|
||||
@@ -22,23 +22,23 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
|
||||
catch {unset a i}
|
||||
test for-old-1.1 {for tests} {
|
||||
set a {}
|
||||
for {set i 1} {$i<6} {set i [expr $i+1]} {
|
||||
for {set i 1} {$i<6} {incr i} {
|
||||
set a [concat $a $i]
|
||||
}
|
||||
set a
|
||||
} {1 2 3 4 5}
|
||||
test for-old-1.2 {for tests} {
|
||||
set a {}
|
||||
for {set i 1} {$i<6} {set i [expr $i+1]} {
|
||||
if $i==4 continue
|
||||
for {set i 1} {$i<6} {incr i} {
|
||||
if {$i==4} continue
|
||||
set a [concat $a $i]
|
||||
}
|
||||
set a
|
||||
} {1 2 3 5}
|
||||
test for-old-1.3 {for tests} {
|
||||
set a {}
|
||||
for {set i 1} {$i<6} {set i [expr $i+1]} {
|
||||
if $i==4 break
|
||||
for {set i 1} {$i<6} {incr i} {
|
||||
if {$i==4} break
|
||||
set a [concat $a $i]
|
||||
}
|
||||
set a
|
||||
@@ -55,12 +55,12 @@ test for-old-1.7 {for tests} {
|
||||
} {wrong # args: should be "for start test next command"}
|
||||
test for-old-1.8 {for tests} {
|
||||
set a {xyz}
|
||||
for {set i 1} {$i<6} {set i [expr $i+1]} {}
|
||||
for {set i 1} {$i<6} {incr i} {}
|
||||
set a
|
||||
} xyz
|
||||
test for-old-1.9 {for tests} {
|
||||
set a {}
|
||||
for {set i 1} {$i<6} {set i [expr $i+1]; if $i==4 break} {
|
||||
for {set i 1} {$i<6} {incr i; if {$i==4} break} {
|
||||
set a [concat $a $i]
|
||||
}
|
||||
set a
|
||||
|
||||
Reference in New Issue
Block a user