diff options
| author | pooryorick <com.digitalsmarties@pooryorick.com> | 2024-03-24 00:05:49 (GMT) |
|---|---|---|
| committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2024-03-24 00:05:49 (GMT) |
| commit | da9e6aad0ade6688ee32e7b56c8c81f5b696ba20 (patch) | |
| tree | 3c8e9d7d5a046e526dece8b941fac349aee02f68 | |
| parent | 97d8790710602888ff3726e46a05b9178b2b2923 (diff) | |
| parent | 9d3646eaee37dcfe6b5a44ebdf7380b5684f3c7b (diff) | |
| download | tcl-da9e6aad0ade6688ee32e7b56c8c81f5b696ba20.zip tcl-da9e6aad0ade6688ee32e7b56c8c81f5b696ba20.tar.gz tcl-da9e6aad0ade6688ee32e7b56c8c81f5b696ba20.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.test | 4 | ||||
| -rw-r--r-- | tests/tcltests.tcl | 5 |
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-}]}] |
