From d67cdd74e35b548ffb76983b85b1a970c97622fc Mon Sep 17 00:00:00 2001 From: Arran Ubels Date: Fri, 4 Aug 2023 13:01:09 +1000 Subject: [PATCH] Or this? -- So confused. --- .../cmd/testdata/scripts/templatefuncs_windows.txtar | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/cmd/testdata/scripts/templatefuncs_windows.txtar b/internal/cmd/testdata/scripts/templatefuncs_windows.txtar index f060f22d83f..a137929144b 100644 --- a/internal/cmd/testdata/scripts/templatefuncs_windows.txtar +++ b/internal/cmd/testdata/scripts/templatefuncs_windows.txtar @@ -1,13 +1,13 @@ [!windows] skip 'Windows only' # test lookPathIn template function to find in specified script - success with extension -exec chezmoi execute-template '{{ lookPathIn "git.exe" "c:\windows\system32;c:\windows\system64;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd" }}' -stdout '^C:\Program Files\Git\cmd\git.exe$' +exec chezmoi execute-template '{{ lookPathIn "git.exe" "c:\\windows\\system32;c:\\windows\\system64;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\Git\\cmd" }}' +stdout '^C:\\Program Files\\Git\\cmd\\git.exe$' # test lookPathIn template function to find in specified script - success without extension -exec chezmoi execute-template '{{ lookPathIn "git" "c:\windows\system32;c:\windows\system64;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd" }}' -stdout '^C:\Program Files\Git\cmd\git.exe$' +exec chezmoi execute-template '{{ lookPathIn "git" "c:\\windows\\system32;c:\\windows\\system64;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\Git\\cmd" }}' +stdout '^C:\\Program Files\\Git\\cmd\\git.exe$' # test lookPathIn template function to find in specified script - failure -exec chezmoi execute-template '{{ lookPathIn "asdf" "c:\windows\system32;c:\windows\system64;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd" }}' +exec chezmoi execute-template '{{ lookPathIn "asdf" "c:\\windows\\system32;c:\\windows\\system64;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\Git\\cmd" }}' stdout '^$'