summaryrefslogtreecommitdiffstats
path: root/tests/listObj.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/listObj.test')
-rw-r--r--tests/listObj.test48
1 files changed, 26 insertions, 22 deletions
diff --git a/tests/listObj.test b/tests/listObj.test
index aa319bb..53017b1 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,18 +175,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: