Skip to content

Commit

Permalink
Forgot about the template funcs "txtar"
Browse files Browse the repository at this point in the history
  • Loading branch information
arran4 committed Aug 3, 2023
1 parent 2518e2e commit 2ce402a
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 "winver.exe" "C:\\Windows\\System32" }}'
stdout ^c:\\Windows\\winver.exe$
exec chezmoi execute-template '{{ lookPathIn "powershell.exe""c:\\windows\\system32;c:\\windows\\system64;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" }}'
stdout ^C:\\WINDOWS\\System32\\WindowsPowerShell\\v1\.0\\powershell.exe$

# test lookPathIn template function to find in specified script - success without extension
exec chezmoi execute-template '{{ lookPathIn "winver" "C:\\Windows\\System32" }}'
stdout ^c:\\Windows\\winver.exe$
exec chezmoi execute-template '{{ lookPathIn "powershell" "c:\\windows\\system32;c:\\windows\\system64;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" }}'
stdout ^C:\\WINDOWS\\System32\\WindowsPowerShell\\v1\.0\\powershell.exe$

# test lookPathIn template function to find in specified script - failure
exec chezmoi execute-template '{{ lookPathIn "winver" "c:\\users" }}'
exec chezmoi execute-template '{{ lookPathIn "weakshell" "c:\\windows\\system32;c:\\windows\\system64;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" }}'
stdout ^$

0 comments on commit 2ce402a

Please sign in to comment.