diff options
Diffstat (limited to 'src/Pipe.zig')
| -rw-r--r-- | src/Pipe.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Pipe.zig b/src/Pipe.zig index 4d525f01..8c25a797 100644 --- a/src/Pipe.zig +++ b/src/Pipe.zig @@ -36,14 +36,6 @@ pub fn deinit(pipe: *Pipe, gpa: std.mem.Allocator) void { pipe.writes.deinit(gpa); } -fn nextPipeEffect(p: *Pardes) ?u32 { - while (p.nextEffect()) |effect| switch (effect) { - .pipe => |request| return request.id, - else => {}, - }; - return null; -} - /// The tag-tail marker each behaviour arms with. One function so the prompt /// that is DRAWN and the command that is PARSED can never disagree. pub fn pipeMarker(how: modal.Normal.PipeBehavior) []const u8 { @@ -329,6 +321,14 @@ pub fn pipeResponse( t.show(); } +fn nextPipeEffect(p: *Pardes) ?u32 { + while (p.nextEffect()) |effect| switch (effect) { + .pipe => |request| return request.id, + else => {}, + }; + return null; +} + test "selection pipe prompt submits exact request and Escape cancels" { const gpa = std.testing.allocator; const p = try Pardes.init(gpa, .{ .tty_only = true }); |
