audiofile: make test non-interactive.

This commit is contained in:
Mike McQuaid 2012-09-02 00:50:20 -07:00
parent cc0d6ac352
commit bd7d1bba9e

View file

@ -22,19 +22,16 @@ class Audiofile < Formula
def test
inn = '/System/Library/Sounds/Glass.aiff'
out = 'Glass.wav'
hear_bin = '/usr/bin/qlmanage'
conv_bin = "#{bin}/sfconvert"
info_bin = "#{bin}/sfinfo"
unless File.exist?(conv_bin) and File.exist?(inn) and
File.exist?(hear_bin) and File.exist?(info_bin)
unless File.exist?(conv_bin) and File.exist?(inn) and File.exist?(info_bin)
opoo <<-EOS.undent
One of the following files could not be located, and so
the test was not executed:
#{inn}
#{conv_bin}
#{info_bin}
#{hear_bin}
Audiofile can also be tested at build-time:
brew install -v audiofile --with-check
@ -45,7 +42,6 @@ class Audiofile < Formula
mktemp do
system conv_bin, inn, out, 'format', 'wave'
system info_bin, '--short', '--reporterror', out
system hear_bin, '-p', out if ARGV.verbose?
end
end
end