diff options
author | dgp <dgp@users.sourceforge.net> | 2010-03-18 20:38:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2010-03-18 20:38:43 (GMT) |
commit | cc8fa4dd648bde5b76d8a2b94be442b6ba473f01 (patch) | |
tree | 891debe41e41785e24733aec27b1ff525c3ae425 /tests | |
parent | 77b68a86673dd317c45b6b4b9b61316fc564badf (diff) | |
download | tcl-cc8fa4dd648bde5b76d8a2b94be442b6ba473f01.zip tcl-cc8fa4dd648bde5b76d8a2b94be442b6ba473f01.tar.gz tcl-cc8fa4dd648bde5b76d8a2b94be442b6ba473f01.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..515592b 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.8.10.1 2010/03/18 20:38:43 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 |