summaryrefslogtreecommitdiffstats
path: root/tests/listObj.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/listObj.test')
-rw-r--r--tests/listObj.test50
1 files changed, 27 insertions, 23 deletions
diff --git a/tests/listObj.test b/tests/listObj.test
index 390ee64..1b9b542 100644
--- a/tests/listObj.test
+++ b/tests/listObj.test
@@ -16,19 +16,13 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
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
-}
+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}
@@ -181,7 +175,25 @@ test listobj-9.1 {UpdateStringOfList} {
string length [list foo\x00help]
} 8
-test listobj-11.1 {bug 3598580} {
+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
@@ -189,14 +201,6 @@ test listobj-11.1 {bug 3598580} {
::tcltest::cleanupTests
return
-
-
-
-
-
-
-
-
-
-
-
+# Local Variables:
+# mode: tcl
+# End: