mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
input: add unit test for no associated text on release
This commit is contained in:
@ -1364,6 +1364,29 @@ test "kitty: report associated" {
|
|||||||
try testing.expectEqualStrings("\x1b[106:74;2;74u", actual);
|
try testing.expectEqualStrings("\x1b[106:74;2;74u", actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "kitty: report associated on release" {
|
||||||
|
var buf: [128]u8 = undefined;
|
||||||
|
var enc: KeyEncoder = .{
|
||||||
|
.event = .{
|
||||||
|
.action = .release,
|
||||||
|
.key = .j,
|
||||||
|
.mods = .{ .shift = true },
|
||||||
|
.utf8 = "J",
|
||||||
|
.unshifted_codepoint = 106,
|
||||||
|
},
|
||||||
|
.kitty_flags = .{
|
||||||
|
.disambiguate = true,
|
||||||
|
.report_all = true,
|
||||||
|
.report_alternates = true,
|
||||||
|
.report_associated = true,
|
||||||
|
.report_events = true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const actual = try enc.kitty(&buf);
|
||||||
|
try testing.expectEqualStrings("[106:74;2:3u", actual[1..]);
|
||||||
|
}
|
||||||
|
|
||||||
test "kitty: alternates omit control characters" {
|
test "kitty: alternates omit control characters" {
|
||||||
var buf: [128]u8 = undefined;
|
var buf: [128]u8 = undefined;
|
||||||
var enc: KeyEncoder = .{
|
var enc: KeyEncoder = .{
|
||||||
|
Reference in New Issue
Block a user