Skip to content

Commit

Permalink
Or this? -- So confused.
Browse files Browse the repository at this point in the history
  • Loading branch information
arran4 committed Aug 4, 2023
1 parent e11a966 commit d67cdd7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/cmd/testdata/scripts/templatefuncs_windows.txtar
Original file line number Diff line number Diff line change
@@ -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 '^$'

0 comments on commit d67cdd7

Please sign in to comment.