# Commands covered: various # # This file contains a collection of miscellaneous Tcl tests that # don't fit naturally in any of the other test files. Many of these # tests are pathological cases that caused bugs in earlier Tcl # releases. # # Copyright 1992 Regents of the University of California # Permission to use, copy, modify, and distribute this # software and its documentation for any purpose and without # fee is hereby granted, provided that this copyright notice # appears in all copies. The University of California makes no # representations about the suitability of this software for any # purpose. It is provided "as is" without express or implied # warranty. # # $Header: /a/cvs/386BSD/ports/tcl/tests/misc.test,v 1.1.1.1 1993/08/09 10:57:45 alm Exp $ (Berkeley) if {[string compare test [info procs test]] == 1} then {source defs} test misc-1.1 {error in variable ref. in command in array reference} { proc tstProc {} { global a set tst $a([winfo name $zz]) # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment } set msg {} list [catch tstProc msg] $msg } {1 {can't read "zz": no such variable}} test misc-1.2 {error in variable ref. in command in array reference} { proc tstProc {} " global a set tst \$a(\[winfo name \$\{zz) # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment # this is a bogus comment " set msg {} list [catch tstProc msg] $msg $errorInfo } {1 {missing close-brace for variable name} missing\ close-brace\ for\ variable\ name\n\ \ \ \ while\ executing\n\"winfo\ name\ \$\{zz)\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ bogus\ commen\ ...\"\n\ \ \ \ (parsing\ index\ for\ array\ \"a\")\n\ \ \ \ invoked\ from\ within\n\"set\ tst\ \$a(\[winfo\ name\ \$\{zz)\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ bogus\ comment\n\t#\ this\ is\ a\ \ ...\"\n\ \ \ \ (procedure\ \"tstProc\"\ line\ 4)\n\ \ \ \ invoked\ from\ within\n\"tstProc\"}