diff options
author | fvogel <fvogelnew1@free.fr> | 2017-08-23 21:09:29 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-08-23 21:09:29 (GMT) |
commit | c6f08d6f32553470d7cb522fc39625553e92e8cd (patch) | |
tree | 9a1aa00a3269dbf2bc082ae135bf37028baca9c6 /tests/imgPhoto.test | |
parent | 6d6a6d4ab30f82c477c42dd6adf05355971e8a65 (diff) | |
download | tk-c6f08d6f32553470d7cb522fc39625553e92e8cd.zip tk-c6f08d6f32553470d7cb522fc39625553e92e8cd.tar.gz tk-c6f08d6f32553470d7cb522fc39625553e92e8cd.tar.bz2 |
Fix [cc42cc18a5]: Prevent the test suite from crashing when running tests imgPhoto-18.* in case the host machine runs out of memory and the memory allocation error is not returned (e.g. on FreeBSD 11.1)bug_b601ce3ab1
Diffstat (limited to 'tests/imgPhoto.test')
-rw-r--r-- | tests/imgPhoto.test | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 90aec24..cf25d6a 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -740,7 +740,7 @@ test imgPhoto-18.1 {Reject corrupted GIF (binary string)} -constraints { } -setup { package require base64 set data [base64::decode { - R0lGODlhwjMz//8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV + R0lGODlhAAQABP8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV 5qpraXIvM1JlNyAgOw== }] } -body { @@ -750,7 +750,7 @@ test imgPhoto-18.1 {Reject corrupted GIF (binary string)} -constraints { } -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp test imgPhoto-18.2 {Reject corrupted GIF (base 64 string)} -setup { set data { - R0lGODlhwjMz//8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV + R0lGODlhAAQABP8zM/8z/zP/MzP/////M////yH5CiwheLrcLTBCd6Tv2qW16tdK4jhV 5qpraXIvM1JlNyAgOw== } } -body { @@ -794,8 +794,12 @@ test imgPhoto-18.6 {Reject truncated GIF (file)} -setup { catch {image delete gif1} } -returnCodes error -result {error reading color map} test imgPhoto-18.7 {Reject corrupted GIF (> 4Gb) (binary string)} -constraints { - base64PackageNeeded + base64PackageNeeded nonPortable } -setup { + # About the non portability constraint of this test: see ticket [cc42cc18a5] + # If there is insufficient memory, the error message + # {not enough free memory for image buffer} should be returned. + # Instead, some systems (e.g. FreeBSD 11.1) terminate the test interpreter. package require base64 set data [base64::decode { R0lGODlhwmYz//8zM/8z/zP/MzP/////M////yH5Ciwhe @@ -806,7 +810,13 @@ test imgPhoto-18.7 {Reject corrupted GIF (> 4Gb) (binary string)} -constraints { } -cleanup { catch {image delete gif1} } -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp -test imgPhoto-18.8 {Reject corrupted GIF (> 4Gb) (base 64 string)} -setup { +test imgPhoto-18.8 {Reject corrupted GIF (> 4Gb) (base 64 string)} -constraints { + nonPortable +} -setup { + # About the non portability constraint of this test: see ticket [cc42cc18a5] + # If there is insufficient memory, the error message + # {not enough free memory for image buffer} should be returned. + # Instead, some systems (e.g. FreeBSD 11.1) terminate the test interpreter. set data { R0lGODlhwmYz//8zM/8z/zP/MzP/////M////yH5Ciwhe LrcLTBCd6Tv2qW16tdK4jhV5qpraXIvM1JlNyAgOw== @@ -816,7 +826,13 @@ test imgPhoto-18.8 {Reject corrupted GIF (> 4Gb) (base 64 string)} -setup { } -cleanup { catch {image delete gif1} } -returnCodes error -result {error reading color map|not enough free memory for image buffer} -match regexp -test imgPhoto-18.9 {Reject corrupted GIF (> 4Gb) (file)} -setup { +test imgPhoto-18.9 {Reject corrupted GIF (> 4Gb) (file)} -constraints { + nonPortable +} -setup { + # About the non portability constraint of this test: see ticket [cc42cc18a5] + # If there is insufficient memory, the error message + # {not enough free memory for image buffer} should be returned. + # Instead, some systems (e.g. FreeBSD 11.1) terminate the test interpreter. set fileName [file join [file dirname [info script]] corruptMangled4G.gif] } -body { image create photo gif1 -file $fileName |