diff options
author | dkf <dkf@noemail.net> | 2007-01-18 11:05:24 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2007-01-18 11:05:24 (GMT) |
commit | 3cd95416b5c688b8502bb9c73bdcdbc1564ddba6 (patch) | |
tree | 054014e8203271c954389abfea8e99ffe808722f /tests | |
parent | 0e1ee8d3cbd8e07e09c97169e81d50d9d10167b8 (diff) | |
download | tcl-3cd95416b5c688b8502bb9c73bdcdbc1564ddba6.zip tcl-3cd95416b5c688b8502bb9c73bdcdbc1564ddba6.tar.gz tcl-3cd95416b5c688b8502bb9c73bdcdbc1564ddba6.tar.bz2 |
Detect [Bug 1638414]
FossilOrigin-Name: 2ed27650c63f73cf8a75767b4dabbce1e5326e47
Diffstat (limited to 'tests')
-rw-r--r-- | tests/compile.test | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/tests/compile.test b/tests/compile.test index 2481a81..b18ee9f 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compile.test,v 1.44 2006/11/03 00:34:52 hobbs Exp $ +# RCS: @(#) $Id: compile.test,v 1.45 2007/01/18 11:05:26 dkf Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -446,77 +446,61 @@ if $noComp { test compile-16.1.$noComp {TclCompileScript: word expansion} $constraints { run "list [string repeat {{*}a } 255]" } [lrepeat 255 a] - test compile-16.2.$noComp {TclCompileScript: word expansion} $constraints { run "list [string repeat {{*}a } 256]" } [lrepeat 256 a] - test compile-16.3.$noComp {TclCompileScript: word expansion} $constraints { run "list [string repeat {{*}a } 257]" } [lrepeat 257 a] - test compile-16.4.$noComp {TclCompileScript: word expansion} $constraints { run {{*}list} } {} - test compile-16.5.$noComp {TclCompileScript: word expansion} $constraints { run {{*}list {*}{x y z}} } {x y z} - test compile-16.6.$noComp {TclCompileScript: word expansion} $constraints { run {{*}list {*}[list x y z]} } {x y z} - test compile-16.7.$noComp {TclCompileScript: word expansion} $constraints { run {{*}list {*}[list x y z][list x y z]} } {x y zx y z} - test compile-16.8.$noComp {TclCompileScript: word expansion} -body { set l {x y z} run {{*}list {*}$l} } -constraints $constraints -cleanup { unset l } -result {x y z} - test compile-16.9.$noComp {TclCompileScript: word expansion} -body { set l {x y z} run {{*}list {*}$l$l} } -constraints $constraints -cleanup { unset l } -result {x y zx y z} - test compile-16.10.$noComp {TclCompileScript: word expansion} -body { run {{*}\{} } -constraints $constraints -returnCodes error \ -result {unmatched open brace in list} - test compile-16.11.$noComp {TclCompileScript: word expansion} -body { proc badList {} {return \{} run {{*}[badList]} } -constraints $constraints -cleanup { rename badList {} } -returnCodes error -result {unmatched open brace in list} - test compile-16.12.$noComp {TclCompileScript: word expansion} $constraints { run {{*}list x y z} } {x y z} - test compile-16.13.$noComp {TclCompileScript: word expansion} $constraints { run {{*}list x y {*}z} } {x y z} - test compile-16.14.$noComp {TclCompileScript: word expansion} $constraints { run {{*}list x {*}y z} } {x y z} - test compile-16.15.$noComp {TclCompileScript: word expansion} $constraints { run {list x y {*}z} } {x y z} - test compile-16.16.$noComp {TclCompileScript: word expansion} $constraints { run {list x {*}y z} } {x y z} - test compile-16.17.$noComp {TclCompileScript: word expansion} $constraints { run {list {*}x y z} } {x y z} @@ -539,21 +523,18 @@ test compile-16.18.$noComp {TclCompileScript: word expansion} -body { } -constraints [linsert $constraints 0 knownBug] -cleanup { rename LongList {} } -returnCodes ok -result [expr {1<<20}] - test compile-16.19.$noComp {TclCompileScript: word expansion} -body { proc LongList {} {return [lrepeat [expr {1<<11}] x]} llength [run "list [string repeat {{*}[LongList] } [expr {1<<11}]]"] } -constraints [linsert $constraints 0 knownBug] -cleanup { rename LongList {} } -returnCodes ok -result [expr {1<<22}] - test compile-16.20.$noComp {TclCompileScript: word expansion} -body { proc LongList {} {return [lrepeat [expr {1<<12}] x]} llength [run "list [string repeat {{*}[LongList] } [expr {1<<12}]]"] } -constraints [linsert $constraints 0 knownBug] -cleanup { rename LongList {} } -returnCodes ok -result [expr {1<<24}] - # This is the one that should cause overflow test compile-16.21.$noComp {TclCompileScript: word expansion} -body { proc LongList {} {return [lrepeat [expr {1<<16}] x]} @@ -561,7 +542,6 @@ test compile-16.21.$noComp {TclCompileScript: word expansion} -body { } -constraints [linsert $constraints 0 knownBug] -cleanup { rename LongList {} } -returnCodes ok -result [expr {wide(1)<<32}] - test compile-16.22.$noComp { Bug 845412: TclCompileScript: word expansion not mandatory } -body { @@ -571,7 +551,6 @@ test compile-16.22.$noComp { } -constraints $constraints -cleanup { rename ReturnResults {} } -returnCodes ok -result [string trim [string repeat {x } 260]] - test compile-16.23.$noComp { Bug 1032805: defer parse error until run time } -constraints $constraints -body { @@ -584,7 +563,11 @@ test compile-16.23.$noComp { } -cleanup { namespace delete x } -returnCodes ok -result {syntax {}{}} - +test compile-16.24.$noComp { + Bug 1638414: bad list constant as first expanded term +} -body { + run "{*}\"\{foo bar\"" +} -returnCodes error -result {unmatched open brace in list} } ;# End of noComp loop # These tests are messy because it wrecks the interpreter it runs in! |