Skip to content

Commit

Permalink
chore: add integrity test on files override
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Jan 19, 2024
1 parent 08836c5 commit 9b67d70
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions testdata/files_override.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
exec git init
exec lefthook install
exec git add -A

exec lefthook run echo
stdout 'a-file\.js'

exec lefthook run echo --all-files
stdout 'a-file\.js b_file\.go c,file\.rb'

exec lefthook run echo --file a-file.js --file ghost.file
stdout 'a-file\.js ghost\.file'

stdin b_file.go
exec lefthook run echo --files-from-stdin
stdout 'b_file\.go c,file\.rb'

stdin b_file.go
exec lefthook run echo --files-from-stdin --file ghost.file
stdout 'ghost\.file b_file\.go c,file\.rb'

-- lefthook.yml --
skip_output:
- meta
- execution_info
- summary

echo:
commands:
echo:
files: echo a-file.js
run: echo "{files}"

-- a-file.js --
a-file.js

-- b_file.go --
b_file.go
c,file.rb

-- c,file.rb --
c,file.rb

0 comments on commit 9b67d70

Please sign in to comment.