summaryrefslogtreecommitdiff
path: root/test/output.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/output.zig')
-rw-r--r--test/output.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/output.zig b/test/output.zig
index 8ba2f357..8eb389c8 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -219,6 +219,15 @@ test "references fill the asking text's query pane: sorted under their files, th
try std.testing.expectEqual(@as(?usize, 2), source.places.current);
try std.testing.expectEqual(@as(i32, 3), source.body.cur_row);
try std.testing.expectEqual(@as(usize, 6), results.query.?.total);
+ // Ctrl-n on line 1, Enter: the keyboard on that ref in the text
+ try std.testing.expectEqual(qid, p.active);
+ p.update(.{ .key = .{ .cp = 'n', .ctrl = true } });
+ try std.testing.expectEqual(@as(?usize, 3), source.places.current);
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(@as(usize, 0), p.active);
+ try std.testing.expectEqual(@as(i32, 4), source.body.cur_row);
+ p.update(.{ .key = .{ .cp = 'N' } });
+ try std.testing.expectEqual(@as(?usize, 2), source.places.current);
// n in the owner steps them, round the end without a word
p.active = 0;
p.update(.{ .key = .{ .cp = 'n' } });