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.
This commit is contained in:
Cyrus
2026-08-14 19:16:31 +09:00
committed by Junegunn Choi
parent 85a2a33612
commit d4b6ba781c
+1 -1
View File
@@ -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