Replaced txt by Loaders
This commit is contained in:
@@ -88,6 +88,15 @@ func run() -> void:
|
||||
manager.flush_saves()
|
||||
check(E.eq(manager.load_data("incompatible", "test-password").state, data.state), "New format saves and reloads after incompatible file")
|
||||
|
||||
var readable_path: String = directory.path_join("readable-incompatible.adventure")
|
||||
var readable = FileAccess.open_encrypted_with_pass(readable_path, FileAccess.WRITE, "test-password")
|
||||
readable.store_var(manager._snapshot("readable-incompatible", "test-password", data).payload, false)
|
||||
readable.close()
|
||||
manager.blocked_saves["readable-incompatible"] = true
|
||||
check(manager.archive_incompatible_save("readable-incompatible"), "Readable incompatible save is archived")
|
||||
check((not FileAccess.file_exists(readable_path)) and FileAccess.file_exists(E.add(readable_path, ".incompatible.bak")), "Archived save no longer occupies the active path")
|
||||
check(not manager.blocked_saves.has("readable-incompatible"), "Archiving an incompatible save permits a fresh save")
|
||||
|
||||
# Expected failures below must leave the last good encrypted file intact.
|
||||
data.state.energy = E.neg(1)
|
||||
manager.request_save("latest", "test-password", data)
|
||||
|
||||
Reference in New Issue
Block a user