summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2024-03-23 23:34:58 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2024-03-23 23:34:58 (GMT)
commit9d3646eaee37dcfe6b5a44ebdf7380b5684f3c7b (patch)
tree3c8e9d7d5a046e526dece8b941fac349aee02f68
parent97d8790710602888ff3726e46a05b9178b2b2923 (diff)
downloadtcl-9d3646eaee37dcfe6b5a44ebdf7380b5684f3c7b.zip
tcl-9d3646eaee37dcfe6b5a44ebdf7380b5684f3c7b.tar.gz
tcl-9d3646eaee37dcfe6b5a44ebdf7380b5684f3c7b.tar.bz2
A new test constraint, "bigmem", configurable via the environment variable
TCL_TESTCONSTRAINT_BIGMEM, to bypass tests that require large amounts of memory.
-rw-r--r--tests/binary.test4
-rw-r--r--tests/tcltests.tcl5
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/binary.test b/tests/binary.test
index 299e1e0..da25cd9 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -3048,7 +3048,9 @@ test binary-80.3 {Tcl_GetBytesFromObj} -constraints testbytestring -returnCodes
test binary-80.4 {Tcl_GetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
testbytestring [testbytestring "\xC0\x80\xA0\xA0\xA0\xF0\x9F\x98\x81"]
} -result "expected byte sequence but character 4 was '\U01F601' (U+01F601)"
-test binary-80.5 {Tcl_GetBytesFromObj} -constraints {testbytestring pointerIs64bit deprecated} -body {
+test binary-80.5 {Tcl_GetBytesFromObj} -constraints {
+ bigmem testbytestring pointerIs64bit deprecated
+} -body {
testbytestring [string repeat A [expr 2**31]]
} -returnCodes 1 -result "byte sequence length exceeds INT_MAX"
diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl
index 409a2cc..50ea9d1 100644
--- a/tests/tcltests.tcl
+++ b/tests/tcltests.tcl
@@ -15,6 +15,11 @@ testConstraint debugpurify [
&& [testConstraint debug]
&& [testConstraint purify]
}]
+testConstraint bigmem [expr {[
+ info exists ::env(TCL_TESTCONSTRAINT_BIGMEM)]
+ ? !!$::env(TCL_TESTCONSTRAINT_BIGMEM)
+ : 1
+}]
testConstraint fcopy [llength [info commands fcopy]]
testConstraint fileevent [llength [info commands fileevent]]
testConstraint thread [expr {![catch {package require Thread 2.7-}]}]