diff options
| author | Martin Afanasjew | 2016-01-21 18:43:48 +0100 |
|---|---|---|
| committer | Martin Afanasjew | 2016-01-26 16:26:08 +0100 |
| commit | 99fd172ea89c1270e46e938d729aa28c9797da31 (patch) | |
| tree | b687774ccdda52afe026d5a889e1f336da5396e6 /Library/Homebrew | |
| parent | 77975168e0f2d5e6627d049d6055bc159e3fd89d (diff) | |
| download | brew-99fd172ea89c1270e46e938d729aa28c9797da31.tar.bz2 | |
tests: validate developer bash commands
Also change the logic a bit to iterate over the individual files per
directory, as having a directory without bash commands will otherwise
pass a literal `*.sh` to `bash -n`, causing it to fail.
Closes Homebrew/homebrew#48323.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/test/test_bash.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_bash.rb b/Library/Homebrew/test/test_bash.rb index b77927e0b..7c312f62a 100644 --- a/Library/Homebrew/test/test_bash.rb +++ b/Library/Homebrew/test/test_bash.rb @@ -11,6 +11,10 @@ class BashTests < Homebrew::TestCase end def test_bash_cmds - assert_valid_bash_syntax "#{HOMEBREW_LIBRARY_PATH}/cmd/*.sh" + %w[cmd dev-cmd].each do |dir| + Dir["#{HOMEBREW_LIBRARY_PATH}/#{dir}/*.sh"].each do |cmd| + assert_valid_bash_syntax cmd + end + end end end |
