mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-23 21:30:19 +00:00
fix: remove test as has been suggested in comment
This commit is contained in:
@@ -6660,60 +6660,3 @@ test "Surface: rectangle selection logic" {
|
||||
true, //rectangle selection
|
||||
);
|
||||
}
|
||||
|
||||
test "Surface: link selection line respects prompt boundary" {
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
|
||||
var screen = try terminal.Screen.init(alloc, .{
|
||||
.cols = 20,
|
||||
.rows = 5,
|
||||
.max_scrollback = 0,
|
||||
});
|
||||
defer screen.deinit();
|
||||
|
||||
screen.cursorSetSemanticContent(.{ .prompt = .initial });
|
||||
try screen.testWriteString("/tmp $ ");
|
||||
screen.cursorSetSemanticContent(.{ .input = .clear_explicit });
|
||||
try screen.testWriteString("locale");
|
||||
|
||||
{
|
||||
var sel = screen.selectLine(.{
|
||||
.pin = screen.pages.pin(.{ .active = .{
|
||||
.x = 1,
|
||||
.y = 0,
|
||||
} }).?,
|
||||
.whitespace = null,
|
||||
.semantic_prompt_boundary = true,
|
||||
}).?;
|
||||
defer sel.deinit(&screen);
|
||||
|
||||
const contents = try screen.selectionString(alloc, .{
|
||||
.sel = sel,
|
||||
.trim = false,
|
||||
});
|
||||
defer alloc.free(contents);
|
||||
|
||||
try testing.expectEqualStrings("/tmp $ ", contents);
|
||||
}
|
||||
|
||||
{
|
||||
var sel = screen.selectLine(.{
|
||||
.pin = screen.pages.pin(.{ .active = .{
|
||||
.x = 8,
|
||||
.y = 0,
|
||||
} }).?,
|
||||
.whitespace = null,
|
||||
.semantic_prompt_boundary = true,
|
||||
}).?;
|
||||
defer sel.deinit(&screen);
|
||||
|
||||
const contents = try screen.selectionString(alloc, .{
|
||||
.sel = sel,
|
||||
.trim = false,
|
||||
});
|
||||
defer alloc.free(contents);
|
||||
|
||||
try testing.expectEqualStrings("locale", contents);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user