cover more of the protocol
This commit is contained in:
parent
63d3d9f4a8
commit
e02d319b02
1 changed files with 11 additions and 1 deletions
12
src/main.zig
12
src/main.zig
|
@ -108,6 +108,7 @@ pub fn main() !void {
|
|||
try kcp_writer.print("\x1b]21", .{});
|
||||
for (0..random.int(u3)) |_| {
|
||||
const keys = enum {
|
||||
palette,
|
||||
foreground,
|
||||
background,
|
||||
selection_background,
|
||||
|
@ -124,7 +125,11 @@ pub fn main() !void {
|
|||
transparent_background_color7,
|
||||
transparent_background_color8,
|
||||
};
|
||||
try kcp_writer.print(";{s}=", .{@tagName(random.enumValue(keys))});
|
||||
const key = random.enumValue(keys);
|
||||
switch (key) {
|
||||
.palette => try kcp_writer.print(";{d}=", .{random.int(u8)}),
|
||||
else => try kcp_writer.print(";{s}=", .{@tagName(key)}),
|
||||
}
|
||||
switch (random.enumValue(enum {
|
||||
color1,
|
||||
color2,
|
||||
|
@ -135,6 +140,7 @@ pub fn main() !void {
|
|||
color7,
|
||||
color8,
|
||||
color9,
|
||||
color10,
|
||||
query,
|
||||
empty,
|
||||
})) {
|
||||
|
@ -210,6 +216,10 @@ pub fn main() !void {
|
|||
random.float(f32),
|
||||
},
|
||||
),
|
||||
.color10 => try kcp_writer.print(
|
||||
"rgbi:1.00/1.00/1.00",
|
||||
.{},
|
||||
),
|
||||
.query => try kcp_writer.writeByte('?'),
|
||||
.empty => {},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue