os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/eval.test
First public contribution.
1 # Commands covered: eval
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: eval.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 eval-1.1 {single argument} {
24 test eval-1.2 {multiple arguments} {
29 test eval-1.3 {single argument} {
30 eval concat a b c d e f g
33 test eval-2.1 {error: not enough arguments} {catch eval} 1
34 test eval-2.2 {error: not enough arguments} {
37 } {wrong # args: should be "eval arg ?arg ...?"}
38 test eval-2.3 {error in eval'ed command} {
39 catch {eval {error "test error"}}
41 test eval-2.4 {error in eval'ed command} {
42 catch {eval {error "test error"}} msg
45 test eval-2.5 {error in eval'ed command: setting errorInfo} {
53 \"error \"test error\"\"
54 (\"eval\" body line 3)
62 ::tcltest::cleanupTests