mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Make the PSD size-limit test fail when a size-based PSB promotion happens
This commit is contained in:
1 parent
63eb3eabe4
commit
163caeb86b
1 file changed
+1
-1
@@ -486,7 +486,7 @@ fn every_mode_promoted_by_size_signs_long_blocks_8b64() {
|
||||
assert_eq!(big.decode_merged().unwrap(), small.decode_merged().unwrap(), "{psd_mode:?}");
|
||||
// Without `size_limit_psb` no mode is promoted by its size, the layerless ones included.
|
||||
let opts = PsdExportOptions { size_limit_psb: false, ..PsdExportOptions::default() };
|
||||
let (kept, warnings) = document_to_psd_sized(&doc, &opts, 0, &Interrupt::NONE, PSD_MAX_FILE_SIZE);
|
||||
let (kept, warnings) = document_to_psd_sized(&doc, &opts, 0, &Interrupt::NONE, len + PSD_SAVE_HEADROOM - 1);
|
||||
assert_eq!((kept.written_version(), kept.header.color_mode), (Version::Psd, psd_mode), "{psd_mode:?}: {warnings:?}");
|
||||
assert!(!warnings.iter().any(|w| w.contains("written as PSB")), "{psd_mode:?}: {warnings:?}");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user