diff options
| author | Adam Vandenberg | 2010-06-29 21:51:26 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-30 07:27:23 -0700 |
| commit | b583d0ae488d33ed88c40818636de4bdb50db34b (patch) | |
| tree | 46f3ffa92bb8a8b7de268cb898e5a18bedb384ff /Library | |
| parent | 0aed4925724b189ad6e418be7964b760b439f1b5 (diff) | |
| download | brew-b583d0ae488d33ed88c40818636de4bdb50db34b.tar.bz2 | |
External command 'brew test'.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/examples/brew-test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Contributions/examples/brew-test.rb b/Library/Contributions/examples/brew-test.rb new file mode 100755 index 000000000..ac57a317a --- /dev/null +++ b/Library/Contributions/examples/brew-test.rb @@ -0,0 +1,20 @@ +ARGV.formulae.each do |f| + # Cannot test uninstalled formulae + unless f.installed? + puts "#{f.name} not installed" + next + end + + # Cannot test formulae without a test method + unless f.respond_to? :test + puts "#{f.name} defines no test" + next + end + + puts "Testing #{f.name}" + begin + f.test + rescue + puts "#{f.name}: failed" + end +end |
