diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 02:00:44 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-19 02:00:44 -0300 |
| commit | 7ec51e48d430d4bc06869c09c6cc1325124ac338 (patch) | |
| tree | 8a7cdf9fe0ae6eda0f9d013f62b04f693e6a367c /test/behaviour | |
| parent | 5e30bc2d390a809e0baddaee6eedd5052a556524 (diff) | |
| parent | 808efd09c7bbd4ca055463ae95ca4c2f5f474085 (diff) | |
| download | pardes-7ec51e48d430d4bc06869c09c6cc1325124ac338.tar.gz pardes-7ec51e48d430d4bc06869c09c6cc1325124ac338.zip | |
integration: nothing of a core a process global and the rollback's two faults fixed, with the gutter's ~ for the slot after a text's last newline: pardes-globals (the faults a closed terminal's kitty image and a far client's own Del of a non-plain kind's pane each crashed a client on after a rollback; config.tab_now, Addon's distrust list and Kind's draw tokens into the core; the check in core/root.zig) and pardes-tilde, merged without a conflict; gates in the coordinator's ledger
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/behaviour')
| -rw-r--r-- | test/behaviour/panes.zig | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/behaviour/panes.zig b/test/behaviour/panes.zig index b42cab76..67155776 100644 --- a/test/behaviour/panes.zig +++ b/test/behaviour/panes.zig @@ -903,3 +903,21 @@ test "panes: a rename colours a source its new name's language names, its text u try std.testing.expect(!std.mem.eql(u8, coloured[y * cols + x], plain[y * cols + x])); try s.expect(s.at("/pane/{d}/body", .{n}), "fn check() void {}\n"); } + +test "panes: the row after a file's last newline has ~ where a line number would be, as helix's has, and a last line with no newline has none after it" { + inline for (.{ .{ "one\ntwo\n", true }, .{ "one\ntwo", false } }) |case| { + var s = try Session.initFile(std.testing.allocator, case[0]); + defer s.deinit(); + const tag_row = (try s.where("/test.txt"))[1]; + var rows = std.mem.splitScalar(u8, try s.screen(), '\n'); + for (0..tag_row + 1) |_| _ = rows.next(); + var firsts: [3][]const u8 = undefined; + for (&firsts) |*first| { + var words = std.mem.tokenizeScalar(u8, rows.next() orelse "", ' '); + first.* = words.next() orelse ""; + } + try std.testing.expectEqualStrings("1", firsts[0]); + try std.testing.expectEqualStrings("2", firsts[1]); + try std.testing.expectEqual(case[1], std.mem.eql(u8, firsts[2], "~")); + } +} |
