summaryrefslogtreecommitdiffstats
path: root/tests/parse.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-11-24 19:06:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-11-24 19:06:07 (GMT)
commit158d77b8cba72fb076672d1e53581c432eeb517c (patch)
tree474038e35fbcf4a5debb8dfaf4cf0aae3922b8d0 /tests/parse.test
parent9b685dfb73cdf1260d125dc254daf63a294e0687 (diff)
downloadtcl-158d77b8cba72fb076672d1e53581c432eeb517c.zip
tcl-158d77b8cba72fb076672d1e53581c432eeb517c.tar.gz
tcl-158d77b8cba72fb076672d1e53581c432eeb517c.tar.bz2
* generic/tclParse.c: Corrected faulty check for trailing white
space in {expand} parsing. Thanks Andreas Leitgeb. [Bug 848262]. * tests/parse.test: New tests for the bug.
Diffstat (limited to 'tests/parse.test')
-rw-r--r--tests/parse.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/parse.test b/tests/parse.test
index 3a83af1..2ae8152 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.17 2003/11/14 20:44:46 dgp Exp $
+# RCS: @(#) $Id: parse.test,v 1.18 2003/11/24 19:06:08 dgp Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -215,6 +215,17 @@ test parse-5.23 {Tcl_ParseCommand: {expand} parsing} testparser {
test parse-5.24 {Tcl_ParseCommand: {expand} parsing} testparser {
testparser {{expand}x} 0
} {- {{expand}x} 1 expand {{expand}x} 1 text x 0 {}}
+test parse-5.25 {Tcl_ParseCommand: {expand} parsing} testparser {
+ testparser {{expand}
+} 0
+} {- {{expand}
+} 1 simple {{expand}} 1 text expand 0 {}}
+test parse-5.26 {Tcl_ParseCommand: {expand} parsing} testparser {
+ testparser {{expand};} 0
+} {- {{expand};} 1 simple {{expand}} 1 text expand 0 {}}
+test parse-5.27 {Tcl_ParseCommand: {expand} parsing} testparser {
+ testparser "{expand}\\\n foo bar" 0
+} {- \{expand\}\\\n\ foo\ bar 3 simple {{expand}} 1 text expand 0 simple foo 1 text foo 0 simple bar 1 text bar 0 {}}
test parse-6.1 {ParseTokens procedure, empty word} testparser {
testparser {""} 0