os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/misc.test
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/misc.test	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,83 @@
     1.4 +# Commands covered:  various
     1.5 +#
     1.6 +# This file contains a collection of miscellaneous Tcl tests that
     1.7 +# don't fit naturally in any of the other test files.  Many of these
     1.8 +# tests are pathological cases that caused bugs in earlier Tcl
     1.9 +# releases.
    1.10 +#
    1.11 +# Copyright (c) 1992-1993 The Regents of the University of California.
    1.12 +# Copyright (c) 1994-1996 Sun Microsystems, Inc.
    1.13 +# Copyright (c) 1998-1999 by Scriptics Corporation.
    1.14 +#
    1.15 +# See the file "license.terms" for information on usage and redistribution
    1.16 +# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    1.17 +#
    1.18 +# RCS: @(#) $Id: misc.test,v 1.6 2003/02/16 01:36:32 msofer Exp $
    1.19 +
    1.20 +if {[lsearch [namespace children] ::tcltest] == -1} {
    1.21 +    package require tcltest
    1.22 +    namespace import -force ::tcltest::*
    1.23 +}
    1.24 +
    1.25 +test misc-1.1 {error in variable ref. in command in array reference} {
    1.26 +    proc tstProc {} {
    1.27 +	global a
    1.28 +    
    1.29 +	set tst $a([winfo name $zz])
    1.30 +	# this is a bogus comment
    1.31 +	# this is a bogus comment
    1.32 +	# this is a bogus comment
    1.33 +	# this is a bogus comment
    1.34 +	# this is a bogus comment
    1.35 +	# this is a bogus comment
    1.36 +	# this is a bogus comment
    1.37 +	# this is a bogus comment
    1.38 +    }
    1.39 +    set msg {}
    1.40 +    list [catch tstProc msg] $msg
    1.41 +} {1 {can't read "zz": no such variable}}
    1.42 +test misc-1.2 {error in variable ref. in command in array reference} {
    1.43 +    proc tstProc {} "
    1.44 +	global a
    1.45 +    
    1.46 +	set tst \$a(\[winfo name \$\{zz)
    1.47 +	# this is a bogus comment
    1.48 +	# this is a bogus comment
    1.49 +	# this is a bogus comment
    1.50 +	# this is a bogus comment
    1.51 +	# this is a bogus comment
    1.52 +	# this is a bogus comment
    1.53 +	# this is a bogus comment
    1.54 +	# this is a bogus comment
    1.55 +    "
    1.56 +    set msg {}
    1.57 +    join [list [catch tstProc msg] $msg $errorInfo] \n
    1.58 +} [subst -novariables -nocommands {1
    1.59 +missing close-brace for variable name
    1.60 +missing close-brace for variable name
    1.61 +    while compiling
    1.62 +"set tst $a([winfo name $\{zz)
    1.63 +	# this is a bogus comment
    1.64 +	# this is a bogus comment
    1.65 +	# this is a bogus comment
    1.66 +	# this is a bogus comment
    1.67 +	# this is a ..."
    1.68 +    (compiling body of proc "tstProc", line 4)
    1.69 +    invoked from within
    1.70 +"tstProc"}]
    1.71 +
    1.72 +# cleanup
    1.73 +::tcltest::cleanupTests
    1.74 +return
    1.75 +
    1.76 +
    1.77 +
    1.78 +
    1.79 +
    1.80 +
    1.81 +
    1.82 +
    1.83 +
    1.84 +
    1.85 +
    1.86 +