aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorHannu Hartikainen2014-12-28 00:18:40 +0200
committerJack Nagel2015-01-12 21:46:58 -0500
commit29261d8fcbe0975ca414f5e6e85d8493a0fc1152 (patch)
treefba913ad0e29e43581a774da5edc7d5d5695ba95 /Library/Formula
parentbf4e62503af76354ffb5d7310b0b8bc69b10767e (diff)
downloadhomebrew-29261d8fcbe0975ca414f5e6e85d8493a0fc1152.tar.bz2
flac: add test (encode and decode "raw audio")
Closes #35296. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/flac.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/flac.rb b/Library/Formula/flac.rb
index 7813883e5..b1c611405 100644
--- a/Library/Formula/flac.rb
+++ b/Library/Formula/flac.rb
@@ -63,4 +63,14 @@ class Flac < Formula
system "make", "install"
end
+
+ test do
+ raw_data = "pseudo audio data that stays the same \x00\xff\xda"
+ (testpath/"in.raw").write raw_data
+ # encode and decode
+ system "#{bin}/flac", "--endian=little", "--sign=signed", "--channels=1", "--bps=8", "--sample-rate=8000", "--output-name=in.flac", "in.raw"
+ system "#{bin}/flac", "--decode", "--force-raw", "--endian=little", "--sign=signed", "--output-name=out.raw", "in.flac"
+ # diff input and output
+ system "diff", "in.raw", "out.raw"
+ end
end