summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredman <redman@noemail.net>1999-07-22 02:15:44 (GMT)
committerredman <redman@noemail.net>1999-07-22 02:15:44 (GMT)
commit228463a4c3c4354c82db1ea23c8e273bc58b06e2 (patch)
tree487a02144710fcc9e56ddb53b563220ee358c8ac
parentcfbbcfbcc3e1aaff07cdd5edb7deba4b7d315e3e (diff)
downloadtcl-228463a4c3c4354c82db1ea23c8e273bc58b06e2.zip
tcl-228463a4c3c4354c82db1ea23c8e273bc58b06e2.tar.gz
tcl-228463a4c3c4354c82db1ea23c8e273bc58b06e2.tar.bz2
Applied patch for info complete. [Bug: 2382]
FossilOrigin-Name: 9a47ff649a52f5e83014494fbe5445930162dc67
-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"}} {}