config: formatted action should be parsable into the original

This commit is contained in:
Lukas
2026-08-04 19:45:27 +02:00
parent bab076c1a2
commit 8cfbaf545a

View File

@@ -4611,12 +4611,14 @@ test "action: format" {
const testing = std.testing;
const alloc = testing.allocator;
const a: Action = .{ .text = "👻" };
const a: Action = .{ .text = "👻Ghostty'\"" };
var buf: std.Io.Writer.Allocating = .init(alloc);
defer buf.deinit();
try a.format(&buf.writer);
try testing.expectEqualStrings("text:\\xf0\\x9f\\x91\\xbb", buf.written());
const b = try Binding.Action.parse(buf.written());
try testing.expect(a.equal(b));
}
test "action: format set title" {