Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Format the quick export test (#8535)

aiongg95e59a99c09b
diff --git a/crates/engine/src/web_cmds/tests.rs b/crates/engine/src/web_cmds/tests.rs
index cf45dbb36..7eab0759d 100644
--- a/crates/engine/src/web_cmds/tests.rs
+++ b/crates/engine/src/web_cmds/tests.rs
@@ -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}");