Skip to content

Commit

Permalink
Tidy up test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Aug 14, 2021
1 parent de5cb42 commit dc319c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/testdata/scripts/init.txt
Expand Up @@ -82,7 +82,7 @@ grep '# edited' $HOME/.file
# test chezmoi init --config-path
chhome home10/user
mkgitconfig
chezmoi init --config-path=$HOME/.chezmoi.toml --debug file://$WORK/home/user/.local/share/chezmoi
chezmoi init --config-path=$HOME/.chezmoi.toml file://$WORK/home/user/.local/share/chezmoi
cmp $HOME/.chezmoi.toml golden/chezmoi.toml
! exists $CHEZMOICONFIGDIR/chezmoi.toml

Expand Down
9 changes: 4 additions & 5 deletions internal/cmd/testdata/scripts/merge_unix.txt
@@ -1,6 +1,5 @@
[windows] skip 'UNIX only'

chmod 755 bin/vimdiff
mkhomedir
mksourcedir

Expand All @@ -16,15 +15,15 @@ chhome home2/user
chezmoi merge $HOME${/}.file
stdout ^${CHEZMOISOURCEDIR@R}/dot_file\s+${HOME@R}/\.file\s+${WORK@R}/.*/\.file$

-- bin/vimdiff --
#!/bin/sh

echo "$*"
-- home/user/.config/chezmoi/chezmoi.toml --
[merge]
command = "echo"
-- home/user/.invalid_template --
-- home/user/.local/share/chezmoi/dot_invalid_template.tmpl --
{{
-- home2/user/.config/chezmoi/chezmoi.toml --
[merge]
command = "echo"
args = ["{{ .Source }}", "{{ .Destination }}", "{{ .Target }}"]
-- home2/user/.file --
# destination
Expand Down

0 comments on commit dc319c4

Please sign in to comment.