Merge pull request #8562 from aiongg/fmt-main-fix

Format the quick export test (#8535)
This commit is contained in:
aiongg authored and GitHub committed 2026-10-22 09:53:29 -04:00
commit 8f09d122d3
1 file changed
+7 -1
+7 -1
View File
@@ -474,7 +474,13 @@ fn quick_export_writes_the_format_its_path_names() {
let dir = tmp("quick_ext");
let mut s = session(8);
s.execute("file.export.exportPreferences", json!({"quickExportFormat": "png"})).unwrap();
for (name, format, magic) in [("a.jpeg", "jpg", &b"\xFF\xD8\xFF"[..]), ("b.JPG", "jpg", b"\xFF\xD8\xFF"), ("c.gif", "gif", b"GIF8"), ("d.webp", "webp", b"RIFF"), ("e", "png", b"\x89PNG")] {
for (name, format, magic) in [
("a.jpeg", "jpg", &b"\xFF\xD8\xFF"[..]),
("b.JPG", "jpg", b"\xFF\xD8\xFF"),
("c.gif", "gif", b"GIF8"),
("d.webp", "webp", b"RIFF"),
("e", "png", b"\x89PNG"),
] {
let path = format!("{dir}/{name}");
let r = s.execute("file.export.quickExport", json!({"path": path})).unwrap();
assert_eq!(r["format"], json!(format), "{name}");