From 209d389a81ae565b82e9da745ef17e72e543d477 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 7 Oct 2026 06:46:25 +0100 Subject: [PATCH] Fix test again. --- regress/input-requests.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/regress/input-requests.sh b/regress/input-requests.sh index e020ae607..1f403ac06 100644 --- a/regress/input-requests.sh +++ b/regress/input-requests.sh @@ -68,7 +68,9 @@ def wait_file(path, length, timeout=5): time.sleep(0.05) return b"" -def respawn(command): +def respawn(command, output): + with open(output, "wb"): + pass run("respawn-window", "-k", "-t", "requests:0", command) def wait_pane(expected, context): @@ -123,7 +125,7 @@ try: respawn("stty raw -echo min 1 time 50; " "printf '%s'; dd bs=1 count=%d 2>/dev/null >%s; " "exec cat -v" % - (query, len(expected), shlex.quote(output))) + (query, len(expected), shlex.quote(output)), output) data = read_until(fd, needle) assert b"?" in data, (context, "query missing", data) @@ -181,7 +183,7 @@ try: respawn("stty raw -echo min 1 time 50; " "printf '\\033]%d;?\\033\\\\'; " "dd bs=1 count=%d 2>/dev/null >%s; exec cat -v" % - (colour, len(expected), shlex.quote(output))) + (colour, len(expected), shlex.quote(output)), output) got = wait_file(output, len(expected)) assert got == expected, (context, "colour not applied", got) os.write(fd, b"Z")