summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-03-06 05:19:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-03-06 05:19:11 (GMT)
commitbc0ce06bc7fe8a1bfc555fe2025b979c17136564 (patch)
tree42636281a94594606537c4aec3af5040b56b9a28 /tests
parent33babada06e91831ef25c24d6930a111463995a1 (diff)
parentfcc70507cfb761acbe63f57202b423e6c7378258 (diff)
downloadtcl-bc0ce06bc7fe8a1bfc555fe2025b979c17136564.zip
tcl-bc0ce06bc7fe8a1bfc555fe2025b979c17136564.tar.gz
tcl-bc0ce06bc7fe8a1bfc555fe2025b979c17136564.tar.bz2
merge
Diffstat (limited to 'tests')
-rw-r--r--tests/parse.test38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/parse.test b/tests/parse.test
index c3f05ab..b5211e7 100644
--- a/tests/parse.test
+++ b/tests/parse.test
@@ -1050,6 +1050,44 @@ test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup {
interp delete i
} -returnCodes error -match glob -result {too many nested*}
+test parse-20.1 {TclParseBackslash: truncated escape} testparser {
+ testparser {\u12345} 1
+} {- \\ 1 simple \\ 1 text \\ 0 u12345}
+test parse-20.2 {TclParseBackslash: truncated escape} testparser {
+ testparser {\u12345} 2
+} {- {\u} 1 word {\u} 1 backslash {\u} 0 12345}
+test parse-20.3 {TclParseBackslash: truncated escape} testparser {
+ testparser {\u12345} 3
+} {- {\u1} 1 word {\u1} 1 backslash {\u1} 0 2345}
+test parse-20.4 {TclParseBackslash: truncated escape} testparser {
+ testparser {\u12345} 4
+} {- {\u12} 1 word {\u12} 1 backslash {\u12} 0 345}
+test parse-20.5 {TclParseBackslash: truncated escape} testparser {
+ testparser {\u12345} 5
+} {- {\u123} 1 word {\u123} 1 backslash {\u123} 0 45}
+test parse-20.6 {TclParseBackslash: truncated escape} testparser {
+ testparser {\u12345} 6
+} {- {\u1234} 1 word {\u1234} 1 backslash {\u1234} 0 5}
+test parse-20.7 {TclParseBackslash: truncated escape} testparser {
+ testparser {\u12345} 7
+} {- {\u12345} 1 word {\u12345} 2 backslash {\u1234} 0 text 5 0 {}}
+
+test parse-20.8 {TclParseBackslash: truncated escape} testparser {
+ testparser {\x12X} 1
+} {- \\ 1 simple \\ 1 text \\ 0 x12X}
+test parse-20.9 {TclParseBackslash: truncated escape} testparser {
+ testparser {\x12X} 2
+} {- {\x} 1 word {\x} 1 backslash {\x} 0 12X}
+test parse-20.10 {TclParseBackslash: truncated escape} testparser {
+ testparser {\x12X} 3
+} {- {\x1} 1 word {\x1} 1 backslash {\x1} 0 2X}
+test parse-20.11 {TclParseBackslash: truncated escape} testparser {
+ testparser {\x12X} 4
+} {- {\x12} 1 word {\x12} 1 backslash {\x12} 0 X}
+test parse-20.12 {TclParseBackslash: truncated escape} testparser {
+ testparser {\x12X} 5
+} {- {\x12X} 1 word {\x12X} 2 backslash {\x12} 0 text X 0 {}}
+
cleanupTests
}