From 2d1ab1e660b2c315a49cbdac1701ec176525ec3c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 1 Mar 2024 13:49:14 -0800 Subject: [PATCH] terminal/new: non-passing resize tests --- src/terminal/new/Screen.zig | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/terminal/new/Screen.zig b/src/terminal/new/Screen.zig index dbacafe9a..ca9f00391 100644 --- a/src/terminal/new/Screen.zig +++ b/src/terminal/new/Screen.zig @@ -2037,3 +2037,31 @@ test "Screen: resize (no reflow) more rows with soft wrapping" { try testing.expectEqual(wrapped, row.wrap); } } + +// test "Screen: resize more cols no reflow" { +// const testing = std.testing; +// const alloc = testing.allocator; +// +// var s = try init(alloc, 5, 3, 0); +// defer s.deinit(); +// const str = "1ABCD\n2EFGH\n3IJKL"; +// try s.testWriteString(str); +// +// const cursor = s.cursor; +// try s.resize(10, 3); +// +// // Cursor should not move +// try testing.expectEqual(cursor.x, s.cursor.x); +// try testing.expectEqual(cursor.y, s.cursor.y); +// +// { +// const contents = try s.dumpStringAlloc(alloc, .{ .viewport = .{} }); +// defer alloc.free(contents); +// try testing.expectEqualStrings(str, contents); +// } +// { +// const contents = try s.dumpStringAlloc(alloc, .{ .screen = .{} }); +// defer alloc.free(contents); +// try testing.expectEqualStrings(str, contents); +// } +// }