summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclParse.c5
-rw-r--r--tests/info.test8
3 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cd585d9..605477a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1999-07-21 <redman@scriptics.com>
-
+
+ * tests/info.test:
+ * generic/tclParse.c: Applied patch to fix "info complete"
+ for the string {[a [b]}. Patch from Peter Spjuth. [Bug: 2382]
+
* doc/Utf.3:
* generic/tcl.decls:
* generic/tclDecls.h:
diff --git a/generic/tclParse.c b/generic/tclParse.c
index e465ad7..e3204cc 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.8 1999/07/02 06:41:23 welch Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.9 1999/07/22 02:15:45 redman Exp $
*/
#include "tclInt.h"
@@ -607,7 +607,8 @@ ParseTokens(src, mask, parsePtr)
if (nested.tokenPtr != nested.staticTokens) {
ckfree((char *) nested.tokenPtr);
}
- if ((src[-1] == ']') && !nested.incomplete) {
+ if ((*nested.term != 0) && (src[-1] == ']')
+ && !nested.incomplete) {
break;
}
if (src == parsePtr->end) {
diff --git a/tests/info.test b/tests/info.test
index cd90144..d4fc961 100644
--- a/tests/info.test
+++ b/tests/info.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: info.test,v 1.8 1999/06/26 03:54:15 jenn Exp $
+# RCS: @(#) $Id: info.test,v 1.9 1999/07/22 02:15:45 redman Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -134,6 +134,12 @@ test info-5.2 {info complete option} {
test info-5.3 {info complete option} {
info complete {# Comment should be complete command}
} 1
+test info-5.4 {info complete option} {
+ info complete {[a [b]}
+} 0
+test info-5.5 {info complete option} {
+ info complete {[a [b] }
+} 0
test info-6.1 {info default option} {
proc t1 {a b {c d} {e "long default value"}} {}