fuzz: update stream fuzzer to use TerminalStream

ReadonlyStream was removed from the public API. Update the stream
fuzzer to use TerminalStream, which is the type now returned by
Terminal.vtStream().
This commit is contained in:
Mitchell Hashimoto
2026-03-22 21:16:33 -07:00
parent 6083e9f80b
commit b9669e10c4

View File

@@ -2,7 +2,7 @@ const std = @import("std");
const ghostty_vt = @import("ghostty-vt");
const mem = @import("mem.zig");
const Terminal = ghostty_vt.Terminal;
const ReadonlyStream = ghostty_vt.ReadonlyStream;
const TerminalStream = ghostty_vt.TerminalStream;
/// Use a single global allocator for simplicity and to avoid heap
/// allocation overhead in the fuzzer. The allocator is backed by a fixed
@@ -33,7 +33,7 @@ pub export fn zig_fuzz_test(
}) catch return;
defer t.deinit(alloc);
var stream: ReadonlyStream = t.vtStream();
var stream: TerminalStream = t.vtStream();
defer stream.deinit();
// Use the first byte to decide between the scalar and slice paths