External command 'brew test'.

This commit is contained in:
Adam Vandenberg 2010-06-29 21:51:26 -07:00
parent 0aed492572
commit b583d0ae48

View File

@ -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