Save options test: take the file name after either path separator (Windows)

This commit is contained in:
bflatastic
2026-10-24 17:29:32 +07:00
parent 11c61c97b1
commit 7f8bc837bd
+1 -1
View File
@@ -236,7 +236,7 @@ fn a_remembered_artboard_pick_follows_the_artboards_it_named() {
}
let range = s.execute("file.formatOptions", &json!({})).unwrap()["options"]["range"]["value"].clone();
let r = s.execute("document.save", &json!({})).unwrap();
let files = r["files"].as_array().unwrap().iter().skip(1).map(|f| f.as_str().unwrap().rsplit('/').next().unwrap().to_string());
let files = r["files"].as_array().unwrap().iter().skip(1).map(|f| f.as_str().unwrap().rsplit(['/', '\\']).next().unwrap().to_string());
(range, files.collect())
};
let delete = |i: usize| ("artboard.delete", json!({"index": i}));