terminal: update parser to use new color parser and stream handler

This commit is contained in:
Mitchell Hashimoto
2025-09-11 12:09:52 -07:00
parent 67b7a5f267
commit 3afc8019d5
7 changed files with 367 additions and 492 deletions

View File

@@ -915,15 +915,15 @@ test "osc: 112 incomplete sequence" {
const cmd = a[0].?.osc_dispatch;
try testing.expect(cmd == .color_operation);
try testing.expectEqual(cmd.color_operation.terminator, .bel);
try testing.expect(cmd.color_operation.source == .reset_cursor);
try testing.expect(cmd.color_operation.operations.count() == 1);
var it = cmd.color_operation.operations.constIterator(0);
try testing.expect(cmd.color_operation.op == .osc_112);
try testing.expect(cmd.color_operation.requests.count() == 1);
var it = cmd.color_operation.requests.constIterator(0);
{
const op = it.next().?;
try testing.expect(op.* == .reset);
try testing.expectEqual(
osc.Command.ColorOperation.Kind.cursor,
op.reset,
osc.color.Request{ .reset = .{ .dynamic = .cursor } },
op.*,
);
}
try std.testing.expect(it.next() == null);