mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-24 18:18:17 -06:00
Scripting: add the missing app.preferences.saveToDisk() so imported scripts like Duik get past startup (#1263)
This commit is contained in:
@@ -1978,6 +1978,7 @@ var app = {
|
||||
savePrefAsBool: function () {},
|
||||
savePrefAsFloat: function () {},
|
||||
reload: function () {},
|
||||
saveToDisk: function () {},
|
||||
},
|
||||
newProject: function () { __call("file.newProject", {}); return new Project(); },
|
||||
open: function (file) {
|
||||
|
||||
@@ -94,3 +94,10 @@ fn calling_without_a_name_is_a_script_error() {
|
||||
let o = ok(&mut s, "var c = app.project.items.addComp('N', 100, 100, 1, 1, 25); var l = c.layers.addNull(); l.name = 'Ctl'; l");
|
||||
assert_eq!(o.result, json!({ "type": "[object AVLayer]", "name": "Ctl" }));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn app_preferences_save_to_disk_is_callable() {
|
||||
let mut s = session();
|
||||
let o = ok(&mut s, "app.preferences.saveToDisk(); app.preferences.reload(); [typeof app.preferences.saveToDisk, app.preferences.getPrefAsLong('a', 'b')]");
|
||||
assert_eq!(o.result, json!(["function", 0]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user