summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e_harness.zig9
-rw-r--r--test/snapshots/lsp-rename.golden6
-rw-r--r--test/snapshots/lspcomplete.golden18
-rw-r--r--test/snapshots/lspcompletemoved.golden2
-rw-r--r--test/snapshots/lsprelpath.golden10
-rw-r--r--test/snapshots/msg.golden2
-rw-r--r--test/snapshots/pipe.golden4
-rw-r--r--test/snapshots/selregex.golden4
-rw-r--r--test/snapshots/tagbottom.golden2
-rw-r--r--test/snapshots/tagcmd.golden10
-rw-r--r--test/snapshots/tagpath.golden8
-rw-r--r--test/snapshots/yankpaste.golden8
12 files changed, 46 insertions, 37 deletions
diff --git a/test/e2e_harness.zig b/test/e2e_harness.zig
index 4767871f..6f2f5ef1 100644
--- a/test/e2e_harness.zig
+++ b/test/e2e_harness.zig
@@ -14,6 +14,7 @@ extern "c" fn forkpty(
) c_int;
extern "c" fn execvp(file: [*:0]const u8, argv: [*:null]const ?[*:0]const u8) c_int;
extern "c" fn _exit(status: c_int) noreturn;
+extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int;
/// Monotonic milliseconds; the harness's only clock (std.time lost
/// milliTimestamp in 0.16).
@@ -87,6 +88,14 @@ pub const Harness = struct {
argv[0] = exe;
for (args, 0..) |a, i| argv[i + 1] = a;
+ // The app under test is a fresh outer session even when this harness
+ // itself is running in a pardes pane. Unlike --nested, the boundary
+ // still lets pane shells below that app detect and talk to it, which
+ // nested.snap exercises directly.
+ var boundary_buf: [32:0]u8 = undefined;
+ const boundary = try std.fmt.bufPrintSentinel(&boundary_buf, "{d}", .{@as(u32, @intCast(libc.getpid()))}, 0);
+ if (setenv("PARDES_NESTED_BOUNDARY_PID", boundary, 1) != 0) return error.SetEnvFailed;
+
var master: c_int = undefined;
const ws = posix.winsize{ .row = rows, .col = cols, .xpixel = 0, .ypixel = 0 };
const pid = forkpty(&master, null, null, &ws);
diff --git a/test/snapshots/lsp-rename.golden b/test/snapshots/lsp-rename.golden
index c15092b7..5237554e 100644
--- a/test/snapshots/lsp-rename.golden
+++ b/test/snapshots/lsp-rename.golden
@@ -1,6 +1,6 @@
== snap renamed grid=110x24 cursor=17,9
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/lsp-rename/cwd/rename.zig Save New Del
+| /tmp/pardes-snap/lsp-rename/cwd/rename.zig * Save New Del
| 1 const std = @import("std");
| 2
| 3 fn renamed_helper(x: u32) u32 {
@@ -25,7 +25,7 @@
|
== snap undone grid=110x24 cursor=17,9
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/lsp-rename/cwd/rename.zig Save New Del
+| /tmp/pardes-snap/lsp-rename/cwd/rename.zig * Save New Del
| 1 const std = @import("std");
| 2
| 3 fn helper(x: u32) u32 {
@@ -50,7 +50,7 @@
|
== snap redone grid=110x24 cursor=17,9
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/lsp-rename/cwd/rename.zig Save New Del
+| /tmp/pardes-snap/lsp-rename/cwd/rename.zig * Save New Del
| 1 const std = @import("std");
| 2
| 3 fn renamed_helper(x: u32) u32 {
diff --git a/test/snapshots/lspcomplete.golden b/test/snapshots/lspcomplete.golden
index 8a76f824..d64449e1 100644
--- a/test/snapshots/lspcomplete.golden
+++ b/test/snapshots/lspcomplete.golden
@@ -41,7 +41,7 @@
|
== snap indent grid=120x40 cursor=11,11
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -82,7 +82,7 @@
|
== snap commentindent grid=120x40 cursor=19,13
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -123,7 +123,7 @@
|
== snap athedot grid=120x40 cursor=16,9
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -164,7 +164,7 @@
|
== snap completion grid=120x40 cursor=16,9
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -205,7 +205,7 @@
| 2 a.zig:3:5-12 cinnabar cinnabar,
== snap refill grid=120x40 cursor=16,9
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -246,7 +246,7 @@
| 2 a.zig:3:5-12 cinnabar cinnabar,
== snap step grid=120x40 cursor=19,3
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/lspcomplete/cwd/a.zig Save New Del
+| /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -287,7 +287,7 @@
| 2 a.zig:3:5-12 cinnabar cinnabar,
== snap txtindent grid=120x40 cursor=15,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/notes.txt Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/notes.txt * Save New Del
| 1 abc. def ghi
| 2
|
@@ -328,7 +328,7 @@
|
== snap nosemi grid=100x18 cursor=29,8
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/c.zig Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/c.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -347,7 +347,7 @@
| 2 c.zig:3:5-12 cinnabar cinnabar,
== snap nobrace grid=100x18 cursor=16,9
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcomplete/cwd/d.zig Save New Del
+|^ /tmp/pardes-snap/lspcomplete/cwd/d.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
diff --git a/test/snapshots/lspcompletemoved.golden b/test/snapshots/lspcompletemoved.golden
index bd23bfcd..53489f56 100644
--- a/test/snapshots/lspcompletemoved.golden
+++ b/test/snapshots/lspcompletemoved.golden
@@ -1,6 +1,6 @@
== snap typedthrough grid=120x20 cursor=16,13
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lspcompletemoved/cwd/a.zig Save New Del
+|^ /tmp/pardes-snap/lspcompletemoved/cwd/a.zig * Save New Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
diff --git a/test/snapshots/lsprelpath.golden b/test/snapshots/lsprelpath.golden
index 4fd48958..d263a9bd 100644
--- a/test/snapshots/lsprelpath.golden
+++ b/test/snapshots/lsprelpath.golden
@@ -1,6 +1,6 @@
== snap absrow grid=100x34 cursor=16,6
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig Save New Del
+|^ /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig * Save New Del
| 1 const shade = @import("../shade.zig");
| 2
| 3 pub fn pick(s: shade.Shade) u8 {
@@ -35,7 +35,7 @@
| 2 /tmp/pardes-snap/lsprelpath/cwd/shade.zig:3:5-12 cinnabar cinnabar,
== snap abslook grid=100x34 cursor=19,18
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig Save New Del
+| /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig * Save New Del
| 1 const shade = @import("../shade.zig");
| 2
| 3 pub fn pick(s: shade.Shade) u8 {
@@ -105,7 +105,7 @@
|33: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-74 #bdbdbd,#080808, 75-99 d,#080808,
== snap subrow grid=100x34 cursor=16,6
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|^ /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig Save New Del
+|^ /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig * Save New Del
| 1 const tint = @import("inner/tint.zig");
| 2
| 3 pub fn hue(t: tint.Tint) u8 {
@@ -140,7 +140,7 @@
| 2 inner/tint.zig:3:5-10 indigo indigo,
== snap sublook grid=100x34 cursor=15,18
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig Save New Del
+| /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig * Save New Del
| 1 const tint = @import("inner/tint.zig");
| 2
| 3 pub fn hue(t: tint.Tint) u8 {
@@ -210,7 +210,7 @@
|33: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-43 #bdbdbd,#080808, 44-99 d,#080808,
== snap clicked grid=100x34 cursor=16,19
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig Save New Del
+| /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig * Save New Del
| 1 const tint = @import("inner/tint.zig");
| 2
| 3 pub fn hue(t: tint.Tint) u8 {
diff --git a/test/snapshots/msg.golden b/test/snapshots/msg.golden
index ea8a8ee9..30b20629 100644
--- a/test/snapshots/msg.golden
+++ b/test/snapshots/msg.golden
@@ -166,7 +166,7 @@
|
== snap msgbuiltin grid=70x16 cursor=29,4
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/msg/cwd/a.txt Save New Del
+| /tmp/pardes-snap/msg/cwd/a.txt * Save New Del
| 1 AGAIN
| 2
| 3 Msg hand-written report
diff --git a/test/snapshots/pipe.golden b/test/snapshots/pipe.golden
index 080eb71c..6ca8c9fe 100644
--- a/test/snapshots/pipe.golden
+++ b/test/snapshots/pipe.golden
@@ -13,7 +13,7 @@
| |tr a-z A-Z
== snap filtered grid=180x12 cursor=17,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/pipe/cwd/pipe.txt Save New Del
+| /tmp/pardes-snap/pipe/cwd/pipe.txt * Save New Del
| 1 ALPHA BETA
| 2 gamma delta
|
@@ -26,7 +26,7 @@
|
== snap undone grid=180x12 cursor=17,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/pipe/cwd/pipe.txt Save New Del
+| /tmp/pardes-snap/pipe/cwd/pipe.txt * Save New Del
| 1 alpha beta
| 2 gamma delta
|
diff --git a/test/snapshots/selregex.golden b/test/snapshots/selregex.golden
index 59dc5d86..90f64f72 100644
--- a/test/snapshots/selregex.golden
+++ b/test/snapshots/selregex.golden
@@ -225,7 +225,7 @@
|23: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-159 d,#080808,
== snap commented grid=160x24 cursor=14,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/selregex/cwd/m.zig Save New Del
+| /tmp/pardes-snap/selregex/cwd/m.zig * Save New Del
| 1 // const one = 1;
| 2 // const two = 2;
| 3 // const three = 3;
@@ -250,7 +250,7 @@
|
== snap uncommented grid=160x24 cursor=11,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/selregex/cwd/m.zig Save New Del
+| /tmp/pardes-snap/selregex/cwd/m.zig * Save New Del
| 1 const one = 1;
| 2 const two = 2;
| 3 const three = 3;
diff --git a/test/snapshots/tagbottom.golden b/test/snapshots/tagbottom.golden
index 486390e2..8a1222d3 100644
--- a/test/snapshots/tagbottom.golden
+++ b/test/snapshots/tagbottom.golden
@@ -350,7 +350,7 @@
| 7 mmm
| 8 nnn
| 9 ooo
-| /tmp/pardes-snap/tagbottom/cwd/top.txt bottom.txt Save New Del
+| /tmp/pardes-snap/tagbottom/cwd/top.txt * bottom.txt Save New Del
| 1 ZZONE
| 2 ZZTWO
|
diff --git a/test/snapshots/tagcmd.golden b/test/snapshots/tagcmd.golden
index bb341ac8..2f0bf3b3 100644
--- a/test/snapshots/tagcmd.golden
+++ b/test/snapshots/tagcmd.golden
@@ -1,6 +1,6 @@
== snap edited grid=100x30 cursor=13,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagcmd/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagcmd/cwd/c.txt * Save New Del
| 1 ZZEDITline 1
| 2 line 2
| 3 line 3
@@ -31,7 +31,7 @@
|
== snap colon grid=100x30 cursor=68,1
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagcmd/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagcmd/cwd/c.txt * Save New Del
| 1 ZZEDITline 1
| 2 line 2
| 3 line 3
@@ -62,7 +62,7 @@
|
== snap word grid=100x30 cursor=72,1
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagcmd/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagcmd/cwd/c.txt * Save New Del
| 1 ZZEDITline 1
| 2 line 2
| 3 line 3
@@ -93,7 +93,7 @@
|
== snap saved grid=100x30 cursor=13,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagcmd/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagcmd/cwd/c.txt Save New Del
| 1 ZZEDITline 1
| 2 line 2
| 3 line 3
@@ -133,7 +133,7 @@ line 6
== end file
== snap escaped grid=100x30 cursor=13,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagcmd/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagcmd/cwd/c.txt Save New Del
| 1 ZZEDITline 1
| 2 line 2
| 3 line 3
diff --git a/test/snapshots/tagpath.golden b/test/snapshots/tagpath.golden
index f0c7c15c..8c8b16a9 100644
--- a/test/snapshots/tagpath.golden
+++ b/test/snapshots/tagpath.golden
@@ -155,7 +155,7 @@
|29: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-99 d,#080808,
== snap yanked-path grid=100x30 cursor=41,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagpath/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagpath/cwd/c.txt * Save New Del
| 1 l/tmp/pardes-snap/tagpath/cwd/c.txtine 1
| 2 line 2
| 3 line 3
@@ -186,7 +186,7 @@
|
== snap drag-cross grid=100x30 cursor=41,1
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagpath/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagpath/cwd/c.txt * Save New Del
| 1 l/tmp/pardes-snap/tagpath/cwd/c.txtine 1
| 2 line 2
| 3 line 3
@@ -217,7 +217,7 @@
|
== style drag-cross
|0: 0-56 #949494,#121212, 57-99 d,#121212,
-|1: 0-1 #ffffff,#626262, 2-10 #949494,#121212, 11-41 #080808,#80a0ff, 42-79 #949494,#121212, 80-99 d,#121212,
+|1: 0-1 #ffffff,#626262, 2-10 #949494,#121212, 11-41 #080808,#80a0ff, 42-81 #949494,#121212, 82-99 d,#121212,
|2: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-46 #bdbdbd,#080808, 47-99 d,#080808,
|3: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
|4: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
@@ -248,7 +248,7 @@
|29: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-99 d,#080808,
== snap path-inert grid=100x30 cursor=11,1
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagpath/cwd/c.txt Save New Del
+| /tmp/pardes-snap/tagpath/cwd/c.txt * Save New Del
| 1 l/tmp/pardes-snap/tagpath/cwd/c.txtine 1
| 2 line 2
| 3 line 3
diff --git a/test/snapshots/yankpaste.golden b/test/snapshots/yankpaste.golden
index 612c81f0..b7757431 100644
--- a/test/snapshots/yankpaste.golden
+++ b/test/snapshots/yankpaste.golden
@@ -1,6 +1,6 @@
== snap linewise-below grid=100x30 cursor=13,5
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/yankpaste/cwd/f.txt Save New Del
+| /tmp/pardes-snap/yankpaste/cwd/f.txt * Save New Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -31,7 +31,7 @@
|
== snap linewise-above grid=100x30 cursor=13,6
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/yankpaste/cwd/f.txt Save New Del
+| /tmp/pardes-snap/yankpaste/cwd/f.txt * Save New Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -62,7 +62,7 @@
|
== snap charwise-inline grid=100x30 cursor=10,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/yankpaste/cwd/f.txt Save New Del
+| /tmp/pardes-snap/yankpaste/cwd/f.txt * Save New Del
| 1 liline 1
| 2 line 2
| 3 line 3
@@ -93,7 +93,7 @@
|
== snap blankline grid=100x30 cursor=7,4
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/yankpaste/cwd/f.txt Save New Del
+| /tmp/pardes-snap/yankpaste/cwd/f.txt * Save New Del
| 1 liline 1
| 2
| 3