aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBaptiste Fontaine2015-03-17 16:21:39 +0100
committerMike McQuaid2015-03-17 15:45:30 +0000
commit2b60d1b1bd61d337d9e71c6544b2e294c24a24d6 (patch)
tree0280fe2ad92e28ed2f9886083734d50b843e49c1 /Library
parent95fbb0806633f73df65232f9c564bb7f84daf273 (diff)
downloadhomebrew-2b60d1b1bd61d337d9e71c6544b2e294c24a24d6.tar.bz2
id3tool: test added
Closes #37798. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/id3tool.rb22
1 files changed, 15 insertions, 7 deletions
diff --git a/Library/Formula/id3tool.rb b/Library/Formula/id3tool.rb
index d9dcfd0fa..44b4d8058 100644
--- a/Library/Formula/id3tool.rb
+++ b/Library/Formula/id3tool.rb
@@ -1,14 +1,22 @@
-require 'formula'
-
class Id3tool < Formula
- homepage 'http://nekohako.xware.cx/id3tool/'
- url 'http://nekohako.xware.cx/id3tool/id3tool-1.2a.tar.gz'
- sha1 '23ce1b33c44290e72a0520c07bc43d1dd4cc7886'
+ homepage "http://nekohako.xware.cx/id3tool/"
+ url "http://nekohako.xware.cx/id3tool/id3tool-1.2a.tar.gz"
+ sha256 "7908d66c5aabe2a53ae8019e8234f4231485d80be4b2fe72c9d04013cff1caec"
def install
- system "./configure", "--disable-debug", "--disable-dependency-tracking",
+ system "./configure", "--disable-debug",
+ "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"
- system "make install"
+ system "make", "install"
+ end
+
+ test do
+ mp3 = "#{testpath}/test.mp3"
+ cp test_fixtures("test.mp3"), mp3
+
+ system "#{bin}/id3tool", "-t", "Homebrew", mp3
+ assert_match(/Song Title:\s+Homebrew/,
+ shell_output("#{bin}/id3tool #{mp3}").chomp)
end
end