aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-03-17 17:23:00 +0100
committerMike McQuaid2015-03-18 08:14:07 +0000
commit375d9ef3eedd091b285701816467144a6f0c214b (patch)
treeffd09137ba592107c567da0d15ab5c02bc48f209 /Library/Formula
parent936a42fa1f00211d51f7e13d07ccc68ef167961f (diff)
downloadhomebrew-375d9ef3eedd091b285701816467144a6f0c214b.tar.bz2
musepack: test added
Closes #37799. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/musepack.rb32
1 files changed, 21 insertions, 11 deletions
diff --git a/Library/Formula/musepack.rb b/Library/Formula/musepack.rb
index ff6ff7e7b..39fc73717 100644
--- a/Library/Formula/musepack.rb
+++ b/Library/Formula/musepack.rb
@@ -1,18 +1,28 @@
-require 'formula'
-
class Musepack < Formula
- homepage 'http://www.musepack.net/'
- url 'http://files.musepack.net/source/musepack_src_r475.tar.gz'
- version 'r475'
- sha1 'bdd4042773eb5c885df70d7a19914fa6e2306391'
+ homepage "https://www.musepack.net/"
+ url "http://files.musepack.net/source/musepack_src_r475.tar.gz"
+ version "r475"
+ sha256 "a4b1742f997f83e1056142d556a8c20845ba764b70365ff9ccf2e3f81c427b2b"
+
+ depends_on "cmake" => :build
+ depends_on "libcuefile"
+ depends_on "libreplaygain"
- depends_on 'cmake' => :build
- depends_on 'libcuefile'
- depends_on 'libreplaygain'
+ resource "test-mpc" do
+ url "https://trac.ffmpeg.org/raw-attachment/ticket/1160/decodererror.mpc"
+ sha256 "b16d876b58810cdb7fc06e5f2f8839775efeffb9b753948a5a0f12691436a15c"
+ end
def install
system "cmake", ".", *std_cmake_args
- system "make install"
- lib.install 'libmpcdec/libmpcdec.dylib'
+ system "make", "install"
+ lib.install "libmpcdec/libmpcdec.dylib"
+ end
+
+ test do
+ resource("test-mpc").stage do
+ assert_match(/441001 samples decoded in/,
+ shell_output("#{bin}/mpcdec decodererror.mpc 2>&1"))
+ end
end
end