os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/assocd.test
First public contribution.
1 # This file tests the AssocData facility of Tcl
3 # This file contains a collection of tests for one or more of the Tcl
4 # built-in commands. Sourcing this file into Tcl runs the tests and
5 # generates output for errors. No output means no errors were found.
7 # Copyright (c) 1991-1994 The Regents of the University of California.
8 # Copyright (c) 1994 Sun Microsystems, Inc.
9 # Copyright (c) 1998-1999 by Scriptics Corporation.
11 # See the file "license.terms" for information on usage and redistribution
12 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14 # RCS: @(#) $Id: assocd.test,v 1.5 2000/04/10 17:18:56 ericm Exp $
16 if {[lsearch [namespace children] ::tcltest] == -1} {
17 package require tcltest
18 namespace import -force ::tcltest::*
21 if {[string compare testsetassocdata [info commands testsetassocdata]] != 0} {
22 puts "This application hasn't been compiled with the tests for assocData,"
23 puts "therefore I am skipping all of these tests."
24 ::tcltest::cleanupTests
28 test assocd-1.1 {testing setting assoc data} {
31 test assocd-1.2 {testing setting assoc data} {
34 test assocd-1.3 {testing setting assoc data} {
35 testsetassocdata 123 456
37 test assocd-1.4 {testing setting assoc data} {
38 testsetassocdata abc "abc d e f"
41 test assocd-2.1 {testing getting assoc data} {
44 test assocd-2.2 {testing getting assoc data} {
47 test assocd-2.3 {testing getting assoc data} {
50 test assocd-2.4 {testing getting assoc data} {
54 test assocd-3.1 {testing deleting assoc data} {
57 test assocd-3.2 {testing deleting assoc data} {
60 test assocd-3.3 {testing deleting assoc data} {
61 list [catch {testdelassocdata nonexistent} msg] $msg
65 ::tcltest::cleanupTests