summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/panes.zig14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/panes.zig b/test/panes.zig
index 96819728..233e7627 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -267,22 +267,14 @@ test "a tag with more lines than rows scrolls to keep its caret in view" {
try std.testing.expectEqual(tag_y, top.cursor.?.y);
try std.testing.expectEqualStrings("/", top.at(x, tag_y).grapheme());
- // A column tag does the same in its rows.
+ // A column tag is one row, as acme's: its lines are joined.
many.clearRetainingCapacity();
try many.appendSlice(std.testing.allocator, "New");
for (1..21) |n| try many.print(std.testing.allocator, "\nC{d}", .{n});
p.col_tags[0].own = try p.gpa.dupe(u8, many.items);
p.update(.tick);
- const rows = p.columnBarHeight();
- try std.testing.expectEqual(@as(u16, pardes.MAX_TAG_ROWS), rows);
- pardes.tagline.enterHeader(p, 0);
- p.update(.{ .key = .{ .cp = 'g' } });
- p.update(.{ .key = .{ .cp = 'e' } });
- const header = try p.render(frame.allocator());
- const header_row = p.topBarHeight() + rows - 1;
- try std.testing.expectEqual(header_row, header.cursor.?.y);
- try std.testing.expectEqualStrings("C", header.at(p.col_x[0] + pardes.TAG_TEXT_INSET, header_row).grapheme());
- try std.testing.expectEqualStrings("2", header.at(p.col_x[0] + pardes.TAG_TEXT_INSET + 1, header_row).grapheme());
+ try std.testing.expectEqual(pardes.COLBAR_H, p.columnBarHeight());
+ try std.testing.expect(std.mem.indexOfScalar(u8, p.col_tags[0].own.?, '\n') == null);
}
const TagNavigationTests = struct {