summaryrefslogtreecommitdiff
path: root/core/fuzz.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/fuzz.zig')
-rw-r--r--core/fuzz.zig10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/fuzz.zig b/core/fuzz.zig
index 091eca63..56ded66b 100644
--- a/core/fuzz.zig
+++ b/core/fuzz.zig
@@ -803,6 +803,14 @@ test "a dump and an image cut, flipped and grown: refused or loaded, never a pan
defer gpa.free(bytes);
const image = try pardes.dump.dumpBytes(p);
defer gpa.free(image);
+ // And one with describe-key's state (SPC h k, `g d` found: a root, its
+ // keys, the leaf whose level the band replays), Help's fields as Help
+ // left them.
+ p.update(.{ .key = .{ .cp = pardes.Key.escape } });
+ for (" hkgd") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ try testing.expect(p.view().tag_state.kind == .describe and p.view().tag_state.found);
+ const described = try pardes.dump.byteDump(p);
+ defer gpa.free(described);
// Seconds a road, each core used (`use`). The image's past 1779 seeds
// reach xitdb's own reader (a slot's tag past its kinds: a `switch` on
// it), a dependency's.
@@ -816,7 +824,7 @@ test "a dump and an image cut, flipped and grown: refused or loaded, never a pan
// `live` (the core read in place, its own `live` undefined), a live
// message's `src` length 0xAAAA when the digest walked it.
try loadSeed(bytes, .join, 6356);
- for ([_][]const u8{ bytes, image }, [_]Road{ .join, .restore }, [_]u64{ 2048, 1024 }) |whole, road, n| {
+ for ([_][]const u8{ bytes, described, image }, [_]Road{ .join, .join, .restore }, [_]u64{ 2048, 2048, 1024 }) |whole, road, n| {
try loadSeed(whole, road, 0);
for (1..n + 1) |seed| try loadSeed(whole, road, seed);
}