mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 13:02:50 -05:00
Merge main into feat/scripts-api-d8b-tracing
This commit is contained in:
commit
47a8bcde18
38 files changed
+2780
-190
No files matched your search
@@ -388,6 +388,28 @@ fn a_white_matte_color_is_the_default() {
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
/// A new `IllustratorSaveOptions` reads `compatibility` as its default, ILLUSTRATOR19, and saves
|
||||
/// with it untouched.
|
||||
#[test]
|
||||
fn illustrator_save_options_start_at_illustrator19_compatibility() {
|
||||
let base = folder("aicompat");
|
||||
let mut s = session(&base);
|
||||
let dir = data_folder(&mut s, &base);
|
||||
s.execute("file.new", &json!({"width": 100, "height": 100})).unwrap();
|
||||
let out = logged(
|
||||
&mut s,
|
||||
&base,
|
||||
&format!(
|
||||
"Folder.userData; var o = new IllustratorSaveOptions(); vc.log(o.compatibility);\
|
||||
app.activeDocument.saveAs(new File({}), o);",
|
||||
quoted(&dir.join("a.ai"))
|
||||
),
|
||||
);
|
||||
assert_eq!(out[0], json!("Compatibility.ILLUSTRATOR19"));
|
||||
assert!(dir.join("a.ai").is_file());
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
/// A path that resolves to a name that is not valid UTF-8 is refused before anything is written or
|
||||
/// opened, so no file with a lossy copy of the name is touched.
|
||||
#[cfg(unix)]
|
||||
|
||||
Reference in new issue
Block a user