diff options
Diffstat (limited to 'tests/listObj.test')
| -rw-r--r-- | tests/listObj.test | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/tests/listObj.test b/tests/listObj.test index a240dec..d7fb46c 100644 --- a/tests/listObj.test +++ b/tests/listObj.test @@ -10,27 +10,22 @@ # # 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.5 2000/04/10 17:19:01 ericm Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } -if {[info commands testobj] == {}} { - puts "This application hasn't been compiled with the \"testobj\"" - puts "command, so I can't test the Tcl type and object support." - ::tcltest::cleanupTests - return -} +::tcltest::loadTestedCommands +catch [list package require -exact Tcltest [info patchlevel]] + +testConstraint testobj [llength [info commands testobj]] catch {unset x} -test listobj-1.1 {Tcl_GetListObjType} { - set t [testobj types] - set first [string first "list" $t] - set result [expr {$first != -1}] -} {1} +test listobj-1.1 {Tcl_GetListObjType} emptyTest { + # Test removed; tested an internal detail + # that's no longer correct, and duplicated test obj-1.1 +} {} test listobj-2.1 {Tcl_SetListObj, use in lappend} { catch {unset x} @@ -183,18 +178,32 @@ 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}} +} + +test listobj-11.1 {Bug 3598580: Tcl_ListObjReplace refcount management} testobj { + testobj bug3598580 +} 123 + # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - +# Local Variables: +# mode: tcl +# End: |
