summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/compile.test9
-rw-r--r--tests/parse.test8
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/compile.test b/tests/compile.test
index 7d282ae..557b3b5 100644
--- a/tests/compile.test
+++ b/tests/compile.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: compile.test,v 1.49 2008/09/10 13:50:05 dkf Exp $
+# RCS: @(#) $Id: compile.test,v 1.50 2008/11/17 22:37:36 ferrieux Exp $
package require tcltest 2
namespace import -force ::tcltest::*
@@ -568,6 +568,13 @@ test compile-16.24.$noComp {
} -constraints $constraints -body {
run "{*}\"\{foo bar\""
} -returnCodes error -result {unmatched open brace in list}
+test compile-16.25.$noComp {TclCompileScript: word expansion, naked backslashes} $constraints {
+ run {list {*}{a \n b}}
+} {a {
+} b}
+test compile-16.26.$noComp {TclCompileScript: word expansion, protected backslashes} $constraints {
+ run {list {*}{a {\n} b}}
+} {a {\n} b}
} ;# End of noComp loop
# These tests are messy because it wrecks the interpreter it runs in!
diff --git a/tests/parse.test b/tests/parse.test
index 2220e22..404f0a8 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.34 2008/07/14 20:29:41 msofer Exp $
+# RCS: @(#) $Id: parse.test,v 1.35 2008/11/17 22:37:36 ferrieux Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -229,6 +229,12 @@ test parse-5.26 {Tcl_ParseCommand: {*} parsing} testparser {
test parse-5.27 {Tcl_ParseCommand: {*} parsing} testparser {
testparser "{*}\\\n foo bar" 0
} {- \{*\}\\\n\ foo\ bar 3 simple {{*}} 1 text * 0 simple foo 1 text foo 0 simple bar 1 text bar 0 {}}
+test parse-5.28 {Tcl_ParseCommand: {*} parsing, expanded literals} testparser {
+ testparser {{*}{a b}} 0
+} {- {{*}{a b}} 2 simple a 1 text a 0 simple b 1 text b 0 {}}
+test parse-5.29 {Tcl_ParseCommand: {*} parsing, expanded literals, naked backslashes} testparser {
+ testparser {{*}{a \n b}} 0
+} {- {{*}{a \n b}} 3 simple a 1 text a 0 word {\n} 1 text-to-collapse {\n} 0 simple b 1 text b 0 {}}
test parse-6.1 {ParseTokens procedure, empty word} testparser {
testparser {""} 0