summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-12-05 12:28:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-12-05 12:28:01 (GMT)
commit71a48e59c2eb9d90233530198576fc445abfda42 (patch)
tree94c5a2756c009d91338f8ee894ae0122dd4f35e9 /tests
parent423020bd63284883ef0e1343574dd256b7023ae0 (diff)
parent3041f3f9a1d8a242105ffe99eebae201a7079549 (diff)
downloadtcl-71a48e59c2eb9d90233530198576fc445abfda42.zip
tcl-71a48e59c2eb9d90233530198576fc445abfda42.tar.gz
tcl-71a48e59c2eb9d90233530198576fc445abfda42.tar.bz2
[d2ffcca163] Limit parsing results that are documented to accept only ASCII chars to actually follow that constraint. This requires not trusting isalnum(.) and isalpha(.) to deliver portable identical results.
Diffstat (limited to 'tests')
-rw-r--r--tests/parse.test3
-rw-r--r--tests/parseExpr.test9
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/parse.test b/tests/parse.test
index 5d8afeb..d73c725 100644
--- a/tests/parse.test
+++ b/tests/parse.test
@@ -663,6 +663,9 @@ test parse-12.24 {Tcl_ParseVarName procedure, missing close paren in array refer
test parse-12.25 {Tcl_ParseVarName procedure, nested array reference} testparser {
testparser {$x(a$y(b$z))} 0
} {- {$x(a$y(b$z))} 1 word {$x(a$y(b$z))} 8 variable {$x(a$y(b$z))} 7 text x 0 text a 0 variable {$y(b$z)} 4 text y 0 text b 0 variable {$z} 1 text z 0 {}}
+test parse-12.26 {Tcl_ParseVarName [d2ffcca163] non-ascii} testparser {
+ testparser "$\u0433" -1
+} "- {$\u0433} 1 word {$\u0433} 2 text {$} 0 text \u0433 0 {}"
test parse-13.1 {Tcl_ParseVar procedure} testparsevar {
set abc 24
diff --git a/tests/parseExpr.test b/tests/parseExpr.test
index 5c7986a..ef05454 100644
--- a/tests/parseExpr.test
+++ b/tests/parseExpr.test
@@ -1064,6 +1064,15 @@ test parseExpr-22.18 {Bug 3401704} -constraints testexprparser -body {
dict get $o -errorcode
} -result {TCL PARSE EXPR BADNUMBER BINARY}
+test parseExpr-22.19 {Bug d2ffcca163} -constraints testexprparser -body {
+ testexprparser \u0433 -1
+} -returnCodes error -match glob -result {*invalid character*}
+test parseExpr-22.20 {Bug d2ffcca163} -constraints testexprparser -body {
+ testexprparser \u043f -1
+} -returnCodes error -match glob -result {*invalid character*}
+test parseExpr-22.21 {Bug d2ffcca163} -constraints testexprparser -body {
+ testexprparser in\u0433(0) -1
+} -returnCodes error -match glob -result {missing operand*}
# cleanup
cleanupTests