update the UI
This commit is contained in:
@@ -19,6 +19,7 @@ import Testing
|
||||
await h.store.settle()
|
||||
h.store.edit("a edited")
|
||||
h.store.open("b.txt")
|
||||
await h.store.settle()
|
||||
h.store.edit("b edited")
|
||||
await h.store.settle()
|
||||
#expect(h.files.current("a.txt") == "a edited")
|
||||
@@ -141,9 +142,7 @@ import Testing
|
||||
asked.append(path)
|
||||
return path == "a.txt" ? .save : .discard
|
||||
}
|
||||
h.store.open("a.txt")
|
||||
await h.store.settle()
|
||||
h.store.edit("a2")
|
||||
h.strand("a.txt", disk: "a", buffer: "a2")
|
||||
h.store.open("b.txt")
|
||||
await h.store.settle()
|
||||
h.store.edit("b2")
|
||||
@@ -158,9 +157,7 @@ import Testing
|
||||
@Test func cancellingThePromptKeepsEveryEdit() async {
|
||||
let h = EditorHarness(files: ["a.txt": "a", "b.txt": "b"])
|
||||
h.store.confirmUnsavedClose = { $0 == "a.txt" ? .discard : .cancel }
|
||||
h.store.open("a.txt")
|
||||
await h.store.settle()
|
||||
h.store.edit("a2")
|
||||
h.strand("a.txt", disk: "a", buffer: "a2")
|
||||
h.store.open("b.txt")
|
||||
await h.store.settle()
|
||||
h.store.edit("b2")
|
||||
|
||||
Reference in New Issue
Block a user