os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/concat.test
Update contrib.
1 # Commands covered: concat
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-1993 The Regents of the University of California.
8 # Copyright (c) 1994-1996 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: concat.test,v 1.5 2000/04/10 17:18:58 ericm Exp $
16 if {[lsearch [namespace children] ::tcltest] == -1} {
17 package require tcltest
18 namespace import -force ::tcltest::*
21 test concat-1.1 {simple concatenation} {
24 test concat-1.2 {merging lists together} {
25 concat a {b c d} {e f g h}
27 test concat-1.3 {merge lists, retain sub-lists} {
28 concat a {b {c d}} {{e f}} g h
29 } {a b {c d} {e f} g h}
30 test concat-1.4 {special characters} {
31 concat a\{ {b \{c d} \{d
34 test concat-2.1 {error: one empty argument} {
38 test concat-3.1 {error: no arguments} {
39 list [catch concat msg] $msg
42 test concat-4.1 {pruning off extra white space} {
45 test concat-4.2 {pruning off extra white space} {
46 concat x y " a b c \n\t " " " " def "
48 test concat-4.3 {pruning off extra white space sets length correctly} {
49 llength [concat { {{a}} }]
53 ::tcltest::cleanupTests