diff options
Diffstat (limited to 'test/output.zig')
| -rw-r--r-- | test/output.zig | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/output.zig b/test/output.zig index 95cdbfb7..478f1b4a 100644 --- a/test/output.zig +++ b/test/output.zig @@ -544,10 +544,11 @@ test "Config prints the startup path and refreshes its one output" { for ([_][]const u8{ "Startup config: " ++ path ++ "\n", "Theme orchard\n", - "Shell requested (new panes) " ++ config.default_shell ++ " (default)\n", "Shell effective (last spawn) (none)\n", "Shell pending on\n", }) |line| try std.testing.expect(std.mem.indexOf(u8, out.content, line) != null); + var default_line: [256]u8 = undefined; + try std.testing.expect(std.mem.indexOf(u8, out.content, try std.fmt.bufPrint(&default_line, "Shell requested (new panes) {s} (default)\n", .{config.defaultShell()})) != null); try std.testing.expectEqualStrings(config.config_buffer, std.fs.path.basename(out.path)); try std.testing.expectEqual(panes.Output.Origin{ .cmd = .Config }, out.output.?.from); @@ -861,6 +862,7 @@ test "n/N resumes the result output whose Look moved focus away" { const p = try Pardes.init(std.testing.allocator, .{ .file = path, .cols = 80, .rows = 24 }); defer p.deinit(); p.locations_config.layout = .@"inline"; + p.settings.look_word = .list; // the +Search listing is what is walked try std.testing.expect(p.executeBuiltinLine(0, "Look target")); const rid = p.panes[0].?.search_pane orelse return error.MissingResults; @@ -1590,10 +1592,13 @@ test "stacked search and LSP results retain source tint navigation and dump owne } restored.active = id; pardes.look.armLookWalk(restored, id); - // The dot came back on the match it was on; the walk goes on. + // The dot came back on the match it was on; the walk goes on + // from it both ways, N wrapping to the last as it does live. try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored.panes[id].?.body.cur_row); - restored.update(.{ .key = .{ .cp = 'n' } }); + restored.update(.{ .key = .{ .cp = 'N' } }); try std.testing.expectEqual(@as(i32, @intCast(matches[1])), restored.panes[id].?.body.cur_row); + restored.update(.{ .key = .{ .cp = 'n' } }); + try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored.panes[id].?.body.cur_row); try std.testing.expectEqualStrings(source_text, source.file.?.content); } } |
