os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/join.test
First public contribution.
1 # Commands covered: join
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 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: join.test,v 1.5 2000/04/10 17:19:01 ericm Exp $
16 if {[lsearch [namespace children] ::tcltest] == -1} {
17 package require tcltest
18 namespace import -force ::tcltest::*
21 test join-1.1 {basic join commands} {
24 test join-1.2 {basic join commands} {
27 test join-1.3 {basic join commands} {
30 test join-1.4 {basic join commands} {
34 test join-2.1 {join errors} {
35 list [catch join msg] $msg $errorCode
36 } {1 {wrong # args: should be "join list ?joinString?"} NONE}
37 test join-2.2 {join errors} {
38 list [catch {join a b c} msg] $msg $errorCode
39 } {1 {wrong # args: should be "join list ?joinString?"} NONE}
40 test join-2.3 {join errors} {
41 list [catch {join "a \{ c" 111} msg] $msg $errorCode
42 } {1 {unmatched open brace in list} NONE}
44 test join-3.1 {joinString is binary ok} {
45 string length [join {a b c} a\0b]
48 test join-3.2 {join is binary ok} {
49 string length [join "a\0b a\0b a\0b"]
53 ::tcltest::cleanupTests