core: match and emit function keys

This commit is contained in:
Mitchell Hashimoto
2023-08-12 21:55:55 -07:00
parent 23f6f950b9
commit c0736676ce
2 changed files with 176 additions and 122 deletions

View File

@@ -270,6 +270,16 @@ fn pcStyle(comptime fmt: []const u8) []const Entry {
}
test "keys" {
const testing = std.testing;
// Force resolution for comptime evaluation.
_ = keys;
// All key sequences must fit into a termio array.
const max = @import("../termio.zig").Message.WriteReq.Small.Max;
for (keys.values) |entries| {
for (entries) |entry| {
try testing.expect(entry.sequence.len <= max);
}
}
}