diff options
author | stanton <stanton> | 1999-04-16 00:46:29 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-04-16 00:46:29 (GMT) |
commit | 97464e6cba8eb0008cf2727c15718671992b913f (patch) | |
tree | ce9959f2747257d98d52ec8d18bf3b0de99b9535 /tests/listObj.test | |
parent | a8c96ddb94d1483a9de5e340b740cb74ef6cafa7 (diff) | |
download | tcl-97464e6cba8eb0008cf2727c15718671992b913f.zip tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.gz tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.bz2 |
merged tcl 8.1 branch back into the main trunk
Diffstat (limited to 'tests/listObj.test')
-rw-r--r-- | tests/listObj.test | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/tests/listObj.test b/tests/listObj.test index 5ea2ad4..2c9e58e 100644 --- a/tests/listObj.test +++ b/tests/listObj.test @@ -6,20 +6,24 @@ # generates output for errors. No output means no errors were found. # # Copyright (c) 1995-1996 Sun Microsystems, Inc. +# Copyright (c) 1998-1999 by Scriptics Corporation. # # 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.2 1998/09/14 18:40:11 stanton Exp $ +# RCS: @(#) $Id: listObj.test,v 1.3 1999/04/16 00:47:30 stanton Exp $ + +if {[lsearch [namespace children] ::tcltest] == -1} { + source [file join [pwd] [file dirname [info script]] defs.tcl] +} 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 } -if {[string compare test [info procs test]] == 1} then {source defs} - catch {unset x} test listobj-1.1 {Tcl_GetListObjType} { set t [testobj types] @@ -27,16 +31,19 @@ test listobj-1.1 {Tcl_GetListObjType} { set result [expr {$first != -1}] } {1} -test listobj-2.1 {Tcl_ListObjForObjArray, use in lappend} { +test listobj-2.1 {Tcl_SetListObj, use in lappend} { catch {unset x} list [lappend x 1 abc def] [lappend x 1 ghi jkl] $x } {{1 abc def} {1 abc def 1 ghi jkl} {1 abc def 1 ghi jkl}} -test listobj-2.2 {Tcl_ListObjForObjArray, use in ObjInterpProc} { +test listobj-2.2 {Tcl_SetListObj, use in ObjInterpProc} { proc return_args {args} { return $args } list [return_args] [return_args x] [return_args x y] } {{} x {x y}} +test listobj-2.3 {Tcl_SetListObj, zero element count} { + list +} {} test listobj-3.1 {Tcl_ListObjAppend, list conversion} { catch {unset x} @@ -174,3 +181,19 @@ test listobj-8.1 {SetListFromAny} { test listobj-9.1 {UpdateStringOfList} { string length [list foo\x00help] } 8 + +# cleanup +::tcltest::cleanupTests +return + + + + + + + + + + + + |