diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-04-29 16:10:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-04-29 16:10:56 (GMT) |
commit | e393e2694c359e49514346cb90569a0d19a43000 (patch) | |
tree | 0c551796499cabebee5589da1f72b7c73266c0ca /tests | |
parent | ef51b5aacdb05bb3e9120129f0c50ae3b31bf915 (diff) | |
download | tcl-e393e2694c359e49514346cb90569a0d19a43000.zip tcl-e393e2694c359e49514346cb90569a0d19a43000.tar.gz tcl-e393e2694c359e49514346cb90569a0d19a43000.tar.bz2 |
Add experimental testcase for TclGetBytesFromObj()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/binary.test | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/binary.test b/tests/binary.test index a947410..940de47 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -3039,6 +3039,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 -returnCodes 1 -body { + testbytestring [string repeat A [expr 2**31]] +} -result "byte sequence length exceeds INT_MAX" # ---------------------------------------------------------------------- # cleanup |