diff options
author | dgp <dgp@users.sourceforge.net> | 2011-05-02 20:17:50 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-05-02 20:17:50 (GMT) |
commit | 8c7f17abd1b362c12e5c02a08b56f80ecfb5d762 (patch) | |
tree | ef3b5e015a4811a57a9eb36926e198d8d5545c88 /tests/parse.test | |
parent | 0460c501692feb12cd4c0198e99712a9ccc5d5eb (diff) | |
parent | 9af810992a3d08e5964ca72b8b6221e120fb42d8 (diff) | |
download | tcl-8c7f17abd1b362c12e5c02a08b56f80ecfb5d762.zip tcl-8c7f17abd1b362c12e5c02a08b56f80ecfb5d762.tar.gz tcl-8c7f17abd1b362c12e5c02a08b56f80ecfb5d762.tar.bz2 |
Revised TclFindElement() interface.
The final argument had been bracePtr, the address of a boolean var, where
the caller can be told whether or not the parsed list element was enclosed
in braces. In practice, no callers really care about that. What the callers
really want to know is whether the list element value exists as a literal
substring of the string being parsed, or whether a call to
TclCopyAndCollpase() is needed to produce the list element value. Now the
final argument is changed to do what callers actually need. This is a
better fit for the calls in tclParse.c, where now a good deal of
post-processing checking for "naked backslashes" is no longer necessary.
***POTENTIAL INCOMPATIBILITY***
For any callers calling in via the internal stubs table who really do use
the final argument explicitly to check for the enclosing brace scenario.
Simply looking for the braces where they must be is the revision available
to those callers, and it will backport cleanly.
Tests for expanded literals quoting detection.
Diffstat (limited to 'tests/parse.test')
-rw-r--r-- | tests/parse.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/parse.test b/tests/parse.test index 21d8779..3523975 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -233,6 +233,12 @@ test parse-5.28 {Tcl_ParseCommand: {*} parsing, expanded literals} testparser { test parse-5.29 {Tcl_ParseCommand: {*} parsing, expanded literals, naked backslashes} testparser { testparser {{*}{a \n b}} 0 } {- {{*}{a \n b}} 1 expand {{*}{a \n b}} 1 text {a \n b} 0 {}} +test parse-5.30 {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.31 {Tcl_ParseCommand: {*} parsing, expanded literals, naked backslashes} testparser { + testparser {{*}"a \n b"} 0 +} {- {{*}"a \n b"} 1 expand {{*}"a \n b"} 3 text {a } 0 backslash {\n} 0 text { b} 0 {}} test parse-6.1 {ParseTokens procedure, empty word} testparser { testparser {""} 0 |