summaryrefslogtreecommitdiff
path: root/test/macos_e2e.swift
diff options
context:
space:
mode:
Diffstat (limited to 'test/macos_e2e.swift')
-rw-r--r--test/macos_e2e.swift22
1 files changed, 2 insertions, 20 deletions
diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift
index 800e2d43..49e0a7f2 100644
--- a/test/macos_e2e.swift
+++ b/test/macos_e2e.swift
@@ -386,21 +386,7 @@ private final class Driver: PardesViewDelegate {
private func snap(_ label: String) {
let frame = readFrame()
output += "== snap \(label) grid=\(frame.cols)x\(frame.rows) cursor=\(frame.cursorX),\(frame.cursorY)\n"
- for line in frame.lines { output += "|\(stableNames(line))\n" }
- }
-
- /// `New` asks the shell for a temporary document and mkstemp picks six
- /// random characters for it (src/temp_file.zig), so the pane tag holding
- /// that name is different on every run. TMPDIR is already pinned inside the
- /// hermetic world, which makes the DIRECTORY reproducible; this makes the
- /// name reproducible. Masked rather than dropped, so a golden still shows
- /// that a temp document is what got opened and where.
- private func stableNames(_ line: String) -> String {
- guard line.contains("pardes-") else { return line }
- return line.replacingOccurrences(
- of: "pardes-[A-Za-z0-9]{6}",
- with: "pardes-XXXXXX",
- options: .regularExpression)
+ for line in frame.lines { output += "|\(line)\n" }
}
/// Put the frame readFrame() just produced on screen — for a window that has
@@ -957,17 +943,13 @@ private func buildWorld(stem: String) throws -> String {
let work = "\(base)/cwd"
let configHome = "\(home)/.config"
let pardesConfig = "\(configHome)/pardes"
- // `New` creates its document under TMPDIR (src/temp_file.zig). Left alone
- // that is the per-user /var/folders/... path launchd hands out, which is
- // different on every machine and lands verbatim in a pane tag — a golden
- // that could only ever pass for whoever generated it.
let tmp = "\(base)/tmp"
for dir in [base, home, work, configHome, pardesConfig, tmp] {
try fm.createDirectory(atPath: dir, withIntermediateDirectories: true)
}
// The shells are started with `--rcfile /tmp/pardes-osc133.bash`, which
- // sources $HOME/.bashrc (src/shell_bin.zig) — so this is what pins the
+ // sources $HOME/.bashrc (host_io.Shell) — so this is what pins the
// prompt to `$ ` and keeps the developer's history out of the capture.
try "PS1='$ '\nHISTFILE=\n".write(toFile: "\(home)/.bashrc", atomically: true, encoding: .utf8)
// ...and the config is not empty, because the DEFAULT shell is fish, whose