summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-06-27 15:31:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-06-27 15:31:05 (GMT)
commite5d7a4afcebda5a988e247b6d7b0226ed44ec2b9 (patch)
tree83d5a4f91b137eee013b5c4b07b61dadb98ff352 /tests
parent07ea9d3df5bc15fa073fdfb056674155b7ba2c49 (diff)
parentd273c052a59ec196e09cf2f9b87d466ed08d6b2e (diff)
downloadtcl-e5d7a4afcebda5a988e247b6d7b0226ed44ec2b9.zip
tcl-e5d7a4afcebda5a988e247b6d7b0226ed44ec2b9.tar.gz
tcl-e5d7a4afcebda5a988e247b6d7b0226ed44ec2b9.tar.bz2
Merge 9.0
Diffstat (limited to 'tests')
-rw-r--r--tests/bigdata.test2
-rw-r--r--tests/encoding.test23
-rw-r--r--tests/indexObj.test4
-rw-r--r--tests/lseq.test2
4 files changed, 18 insertions, 13 deletions
diff --git a/tests/bigdata.test b/tests/bigdata.test
index 5eb7b89..b7afbbc 100644
--- a/tests/bigdata.test
+++ b/tests/bigdata.test
@@ -112,8 +112,10 @@ proc bigPatlenMultiple {limit} {
set ::bigLengths(intmax) 0x7fffffff
set ::bigLengths(uintmax) 0xffffffff
# Some tests are more convenient if operands are multiple of pattern length
+if {[testConstraint bigdata]} {
set ::bigLengths(patlenmultiple) [bigPatlenMultiple $::bigLengths(intmax)]
set ::bigLengths(upatlenmultiple) [bigPatlenMultiple $::bigLengths(uintmax)]
+}
#
# script limits
diff --git a/tests/encoding.test b/tests/encoding.test
index 506ab2c..edca5f0 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -588,13 +588,13 @@ test encoding-16.22 {Utf16ToUtfProc, strict, bug [db7a085bd9]} -body {
test encoding-16.23 {Utf16ToUtfProc, strict, bug [db7a085bd9]} -body {
encoding convertfrom -profile strict utf-16le \x00\xDC
} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\x00'}
-test {encoding-24.4 utf-8 invalid strict} {Parse invalid utf-8, strict} -body {
- string length [encoding convertfrom -profile strict utf-8 "\xC0\x80"]
-} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xC0'}
-test {encoding-24.4 utf-8 invalid tcl8} {UtfToUtfProc utf-8} {
- encoding convertfrom -profile tcl8 utf-8 \xC0\x80
-} \x00
-test encoding-16.25 {Utf32ToUtfProc} -body {
+test encoding-16.24 {Utf32ToUtfProc} -body {
+ encoding convertfrom utf-32 "\xFF\xFF\xFF\xFF"
+} -result \uFFFD
+test {encoding-16.25 strict} {Utf32ToUtfProc} -body {
+ encoding convertfrom -profile strict utf-32 "\x01\x00\x00\x01"
+} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\x01'}
+test {encoding-16.25 tcl8} {Utf32ToUtfProc} -body {
encoding convertfrom -profile tcl8 utf-32 "\x01\x00\x00\x01"
} -result \uFFFD
@@ -779,9 +779,12 @@ test encoding-24.3 {EscapeFreeProc on open channels} {stdio} {
list $count [viewable $line]
} [list 3 "乎乞也 (\\u4E4E\\u4E5E\\u4E5F)"]
-test encoding-24.4 {Parse valid or invalid utf-8} {
- string length [encoding convertfrom -profile tcl8 utf-8 "\xC0\x80"]
-} 1
+test {encoding-24.4 utf-8 invalid strict} {Parse invalid utf-8, strict} -body {
+ encoding convertfrom -profile strict utf-8 "\xC0\x80"
+} -returnCodes 1 -result {unexpected byte sequence starting at index 0: '\xC0'}
+test {encoding-24.4 utf-8 invalid tcl8} {UtfToUtfProc utf-8} {
+ encoding convertfrom -profile tcl8 utf-8 \xC0\x80
+} \x00
test encoding-24.5 {Parse valid or invalid utf-8} {
string length [encoding convertfrom -profile tcl8 utf-8 "\xC0\x81"]
} 2
diff --git a/tests/indexObj.test b/tests/indexObj.test
index 8a3dd47..f8cdf3e 100644
--- a/tests/indexObj.test
+++ b/tests/indexObj.test
@@ -203,13 +203,13 @@ test indexObj-8.10 {Tcl_GetIntForIndex end-1} testgetintforindex {
} -2
test indexObj-8.11 {Tcl_GetIntForIndex end-1} testgetintforindex {
testgetintforindex end-1 -2
-} -3
+} [expr {[testConstraint has64BitLengths] ? -3 : 2147483647}]
test indexObj-8.12 {Tcl_GetIntForIndex end} testgetintforindex {
testgetintforindex end -1
} -1
test indexObj-8.13 {Tcl_GetIntForIndex end} testgetintforindex {
testgetintforindex end -2
-} -2
+} [expr {[testConstraint has64BitLengths] ? -2 : 2147483647}]
test indexObj-8.14 {Tcl_GetIntForIndex end+1} testgetintforindex {
testgetintforindex end+1 -1
} [expr {[testConstraint has64BitLengths] ? 9223372036854775807 : 2147483647}]
diff --git a/tests/lseq.test b/tests/lseq.test
index 543ad89..c7b0079 100644
--- a/tests/lseq.test
+++ b/tests/lseq.test
@@ -598,7 +598,7 @@ test lseq-4.12 {bug lseq} -constraints has64BitLengths -body {
llength [lseq 0x100000000]
} -result {4294967296}
-test lseq-4.13 {bug lseq} -constraints has64BitLengths -body {
+test lseq-4.13 {bug lseq} -constraints {has64BitLengths knownBug} -body {
set l [lseq 0x7fffffffffffffff]
list \
[llength $l] \