diff options
author | dgp <dgp@users.sourceforge.net> | 2010-03-18 20:34:47 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2010-03-18 20:34:47 (GMT) |
commit | eb5c3529d6f7ce0af6006fd19ef2053042141731 (patch) | |
tree | 3e3228f8c83eb5503e48c4498d346f0f3a536d98 /tests | |
parent | 334db97a72461fd68bc9574ff8f6fc628cd40650 (diff) | |
download | tcl-eb5c3529d6f7ce0af6006fd19ef2053042141731.zip tcl-eb5c3529d6f7ce0af6006fd19ef2053042141731.tar.gz tcl-eb5c3529d6f7ce0af6006fd19ef2053042141731.tar.bz2 |
* generic/tclListObj.c: Prevent in overflow trouble in [lreplace]
* generic/tclTestObj.c: operations. Thanks to kbk for fix and test.
* tests/listObj.test: [Bug 2971669].
Diffstat (limited to 'tests')
-rw-r--r-- | tests/listObj.test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/listObj.test b/tests/listObj.test index a3c9f20..2e8ae17 100644 --- a/tests/listObj.test +++ b/tests/listObj.test @@ -11,13 +11,15 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: listObj.test,v 1.8 2005/07/27 18:12:43 dgp Exp $ +# RCS: @(#) $Id: listObj.test,v 1.9 2010/03/18 20:34:48 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } +testConstraint testobj [llength [info commands testobj]] + catch {unset x} test listobj-1.1 {Tcl_GetListObjType} emptyTest { # Test removed; tested an internal detail @@ -175,6 +177,28 @@ test listobj-9.1 {UpdateStringOfList} { string length [list foo\x00help] } 8 +test listobj-10.1 {Bug [2971669]} {*}{ + -constraints testobj + -setup { + testobj freeallvars + } + -body { + set result {} + lappend result \ + [testlistobj set 1 a b c d e] \ + [testlistobj replace 1 0x7fffffff 0x7fffffff f] \ + [testlistobj get 1] + } + -cleanup { + testobj freeallvars + } + -result {{a b c d e} {} {a b c d e f}} +} + # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End:
\ No newline at end of file |