mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-06 11:54:19 +00:00
Clean up how fuzzers are laid out
This commit is contained in:
15
test/fuzz-libghostty/src/fuzz_parser.zig
Normal file
15
test/fuzz-libghostty/src/fuzz_parser.zig
Normal file
@@ -0,0 +1,15 @@
|
||||
const std = @import("std");
|
||||
const ghostty_vt = @import("ghostty-vt");
|
||||
|
||||
pub export fn zig_fuzz_init() callconv(.c) void {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
pub export fn zig_fuzz_test(
|
||||
buf: [*]const u8,
|
||||
len: usize,
|
||||
) callconv(.c) void {
|
||||
var p: ghostty_vt.Parser = .init();
|
||||
defer p.deinit();
|
||||
for (buf[0..@intCast(len)]) |byte| _ = p.next(byte);
|
||||
}
|
||||
Reference in New Issue
Block a user