diff options
Diffstat (limited to 'core/Messages.zig')
| -rw-r--r-- | core/Messages.zig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Messages.zig b/core/Messages.zig index fb2c3cde..20768548 100644 --- a/core/Messages.zig +++ b/core/Messages.zig @@ -1601,13 +1601,14 @@ test "a file changed on disk under unsaved text asks in its tag and never takes const prefix = try pardes.tagline.tagPrefix(p, pane); try std.testing.expect(std.mem.indexOf(u8, prefix, "changed on disk") == null); // The tag's own text is no one's to edit meanwhile. - try std.testing.expect((try pardes.TagState.head(p, frame.allocator(), pane)) != null); - // Out of rest (SPC's level shown) the level's head, not the question; - // at rest again, the question. + try std.testing.expect(pardes.TagState.asks(p, pane)); + // Out of rest (SPC's level shown) the tag as at rest, the question in + // it, the level's head under it (UX DESIGN M1); at rest, the question. p.update(.{ .key = .{ .cp = ' ' } }); p.advance(p.clock.now_ns); p.clock.now_ns = p.view().tag_state.due_ns; - try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, frame.allocator(), pane), "changed on disk") == null); + try std.testing.expectEqualStrings(shown, try pardes.tagline.tagText(p, frame.allocator(), pane)); + try std.testing.expect(std.mem.startsWith(u8, (try pardes.TagState.head(p, frame.allocator(), pane)).?.text, "␣ ▸ ")); p.update(.{ .key = .{ .cp = Key.escape } }); try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, frame.allocator(), pane), "changed on disk") != null); try std.testing.expectEqualStrings("Reload", p.messages.waitingAnswers(pane)[0].word); |
