From d4b6ba781cef20f5b95df24d8832d3aae4bc3c27 Mon Sep 17 00:00:00 2001 From: Cyrus Date: Wed, 12 Aug 2026 20:06:41 +0800 Subject: [PATCH] Match the current temp file name in the powershell {f} test The template writes to os.CreateTemp("", "fzf-temp-*"); the fzf-preview- prefix went away with the --tmux work. The digit count was also pinned at nine, but CreateTemp's suffix has no fixed width. --- src/terminal_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal_test.go b/src/terminal_test.go index 4bd65d9f..117f0006 100644 --- a/src/terminal_test.go +++ b/src/terminal_test.go @@ -440,7 +440,7 @@ func TestPowershellCommands(t *testing.T) { // to explorer, which will prompt user to pick editing program for the fzf-preview file // the temp file contains: `cat "C:\test.txt"` // TODO this should actually work - {give{`powershell -NoProfile -Command {f}`, ``, newItems(`cat "C:\test.txt"`)}, want{match: `^powershell -NoProfile -Command .*\fzf-preview-[0-9]{9}$`}}, + {give{`powershell -NoProfile -Command {f}`, ``, newItems(`cat "C:\test.txt"`)}, want{match: `^powershell -NoProfile -Command .*\fzf-temp-[0-9]+$`}}, } // to force powershell-style escaping we temporarily set environment variable that fzf honors