diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 09:57:43 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 09:57:43 -0300 |
| commit | a953f560f648e91dda8dd3a8dafe60a7f75739d0 (patch) | |
| tree | 1ae6de86ede6b0e1464708c04478340609e4296e /test | |
| parent | 5033138d9e93e05dc961c0f7b93e46208d5df33d (diff) | |
| download | pardes-a953f560f648e91dda8dd3a8dafe60a7f75739d0.tar.gz pardes-a953f560f648e91dda8dd3a8dafe60a7f75739d0.zip | |
history: each dump is the command that brings it back, `Restore <label>` on a line of its own, its date, size, pane count and names indented on the line under it, so the line is a whole command (a sweep of it, a click on its Restore, a look at it) and the details are read, not parsed; the builtins JSON, the reference and the changelog say so
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test')
| -rw-r--r-- | test/behaviour/root_ctl.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/behaviour/root_ctl.zig b/test/behaviour/root_ctl.zig index a3379685..7cb12a66 100644 --- a/test/behaviour/root_ctl.zig +++ b/test/behaviour/root_ctl.zig @@ -264,7 +264,7 @@ test "root-ctl: a Dump killed in the middle leaves the one before it whole, and try std.testing.expectEqual(@as(usize, 2), (try labels(&s)).len); } -test "root-ctl: a session's end leaves a slim dump the next session's History lists as `Restore <label>` with the panes' names, a middle click on the Restore or a look at the row restores the file pane, and a session of shells alone leaves none" { +test "root-ctl: a session's end leaves a slim dump the next session's History lists as a `Restore <label>` line over its details, a middle click on the Restore or a look at the line restores the file pane, and a session of shells alone leaves none" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); var dir_buf: [std.fs.max_path_bytes]u8 = undefined; @@ -294,7 +294,7 @@ test "root-ctl: a session's end leaves a slim dump the next session's History li try s.write("/exec", "History\n"); const hist = std.mem.trimEnd(u8, try s.read("/exec"), "\n"); const body = try s.read(s.at("/pane/{s}/body", .{hist})); - try std.testing.expect(std.mem.startsWith(u8, body, s.at("Restore {s} ", .{listed[0]}))); + try std.testing.expect(std.mem.startsWith(u8, body, s.at("Restore {s}\n ", .{listed[0]}))); try std.testing.expect(has(body, "a.txt")); // A middle click on the row's Restore: that row's dump restored, the // file pane back with its text; a bare Restore would have been this @@ -302,7 +302,7 @@ test "root-ctl: a session's end leaves a slim dump the next session's History li try s.click(s.at("Restore {s}", .{listed[0]}), 2, 2); try std.testing.expect(has(try s.read("/log"), s.at("restore {s}\n", .{listed[0]}))); try s.expect(s.at("/pane/{d}/body", .{try s.lookFile(s.at("{s}/a.txt", .{dir}))}), "kept on disk\n"); - // A look at the whole row is the same Restore. + // A look at the whole line is the same Restore. try s.write("/exec", "History\n"); const again = std.mem.trimEnd(u8, try s.read("/exec"), "\n"); const row = try s.read(s.at("/pane/{s}/body", .{again})); |
