os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/unknown.test
First public contribution.
1 # Commands covered: unknown
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: unknown.test,v 1.6 2000/04/10 17:19:05 ericm Exp $
16 if {[lsearch [namespace children] ::tcltest] == -1} {
17 package require tcltest
18 namespace import -force ::tcltest::*
22 catch {rename unknown unknown.old}
24 test unknown-1.1 {non-existent "unknown" command} {
25 list [catch {_non-existent_ foo bar} msg] $msg
26 } {1 {invalid command name "_non-existent_"}}
33 test unknown-2.1 {calling "unknown" command} {
37 test unknown-2.2 {calling "unknown" command with lots of args} {
40 } {foobar 1 2 3 4 5 6 7}
41 test unknown-2.3 {calling "unknown" command with lots of args} {
42 foobar 1 2 3 4 5 6 7 8
44 } {foobar 1 2 3 4 5 6 7 8}
45 test unknown-2.4 {calling "unknown" command with lots of args} {
46 foobar 1 2 3 4 5 6 7 8 9
48 } {foobar 1 2 3 4 5 6 7 8 9}
50 test unknown-3.1 {argument quoting in calls to "unknown"} {
51 foobar \{ \} a\{b \; "\\" \$a a\[b \]
53 } "foobar \\{ \\} a\\{b {;} \\\\ {\$a} {a\[b} \\]"
56 error "unknown failed"
59 test unknown-4.1 {errors in "unknown" procedure} {
60 list [catch {non-existent a b} msg] $msg $errorCode
61 } {1 {unknown failed} NONE}
64 catch {rename unknown {}}
65 catch {rename unknown.old unknown}
66 ::tcltest::cleanupTests