summaryrefslogtreecommitdiffstats
path: root/tests/parse.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-03-06 21:56:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-03-06 21:56:34 (GMT)
commitc0758bdb22b297bcdb542f5c0b7c6606ef0fe982 (patch)
tree1211ec9cfc5b15bde14d01f3a575ef6018849853 /tests/parse.test
parent6f94a562a5b889245a18db93b134aaaa62e5b651 (diff)
downloadtcl-c0758bdb22b297bcdb542f5c0b7c6606ef0fe982.zip
tcl-c0758bdb22b297bcdb542f5c0b7c6606ef0fe982.tar.gz
tcl-c0758bdb22b297bcdb542f5c0b7c6606ef0fe982.tar.bz2
* generic/tclBasic.c: Revised handling of TCL_EVAL_* flags to
* tests/parse.test: simplify TclEvalObjvInternal and to correct the auto-loading of alias targets (parse-8.12). [Bug 1444291].
Diffstat (limited to 'tests/parse.test')
-rw-r--r--tests/parse.test25
1 files changed, 23 insertions, 2 deletions
diff --git a/tests/parse.test b/tests/parse.test
index fa1f344..9657951 100644
--- a/tests/parse.test
+++ b/tests/parse.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: parse.test,v 1.22 2006/02/28 15:47:10 dgp Exp $
+# RCS: @(#) $Id: parse.test,v 1.23 2006/03/06 21:56:34 dgp Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -398,7 +398,28 @@ test parse-8.11 {Tcl_EvalObjv procedure, TCL_EVAL_INVOKE} testevalobjv {
rename ::unknown {}
rename unknown.save ::unknown
set ::info
-} [subst {[set level 2; incr level [info level]] namespace 1 global 1 global}]
+} [subst {[set level 2; incr level [info level]] global 1 global 1 global}]
+test parse-8.12 {Tcl_EvalObjv procedure, TCL_EVAL_INVOKE} {
+ set ::auto_index(noSuchCommand) {
+ proc noSuchCommand {} {lappend ::info global}
+ }
+ set ::auto_index(::[string trimleft [namespace current]::test_ns_1::noSuchCommand :]) [list \
+ proc [namespace current]::test_ns_1::noSuchCommand {} {
+ lappend ::info ns
+ }]
+ catch {rename ::noSuchCommand {}}
+ set ::slave [interp create]
+ $::slave alias bar noSuchCommand
+ set ::info {}
+ namespace eval test_ns_1 {
+ $::slave eval bar
+ }
+ namespace delete test_ns_1
+ interp delete $::slave
+ catch {rename ::noSuchCommand {}}
+ set ::info
+} global
+
test parse-9.1 {Tcl_LogCommandInfo, line numbers} testevalex {
catch {unset x}