summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--library/init.tcl4
-rw-r--r--tests/main.test18
3 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d5ae083..c01933e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2005-04-27 Don Porter <dgp@users.sourceforge.net>
+ * library/init.tcl: Corrected flaw in interactive command
+ * tests/main.test: auto-completion. [Bug 1191409].
+
* tests/unixInit.test (7.1): Alternative fix for the
2005-04-22 commit.
diff --git a/library/init.tcl b/library/init.tcl
index 0e7cd94..ea1cd85 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -3,7 +3,7 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
-# RCS: @(#) $Id: init.tcl,v 1.55.2.4 2004/11/13 00:41:58 dgp Exp $
+# RCS: @(#) $Id: init.tcl,v 1.55.2.5 2005/04/28 05:34:40 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -321,7 +321,7 @@ proc unknown args {
}
}
if {[llength $cmds] == 1} {
- return [uplevel 1 [lreplace $args 0 0 $cmds]]
+ return [uplevel 1 [lreplace $args 0 0 [lindex $cmds 0]]]
}
if {[llength $cmds]} {
if {[string equal $name ""]} {
diff --git a/tests/main.test b/tests/main.test
index 6778b88..54f012b 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -1,6 +1,6 @@
# This file contains a collection of tests for generic/tclMain.c.
#
-# RCS: @(#) $Id: main.test,v 1.13 2003/02/16 01:36:32 msofer Exp $
+# RCS: @(#) $Id: main.test,v 1.13.2.1 2005/04/28 05:34:40 dgp Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -840,6 +840,22 @@ namespace eval ::tcl::test::main {
file delete result
} -result "1\n% "
+ test Tcl_Main-6.7 {
+ [unknown]: interactive auto-completion.
+ } -constraints {
+ exec
+ } -body {
+ exec [interpreter] << {
+ proc foo\{ x {}
+ set tcl_interactive 1
+ foo y} >& result
+ set f [open result]
+ read $f
+ } -cleanup {
+ close $f
+ file delete result
+ } -result "1\n% % "
+
# Tests Tcl_Main-7.*: exiting
test Tcl_Main-7.1 {