From 68c2a55c0df05bf7dcfa4549d20ba0dee34115fc Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Mon, 5 Jan 2015 21:13:12 +0100 Subject: [PATCH] bchunk: test added Closes Homebrew/homebrew#35573. Signed-off-by: Jack Nagel --- Formula/bchunk.rb | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Formula/bchunk.rb b/Formula/bchunk.rb index 8b974e8d65..6ff7a7d29b 100644 --- a/Formula/bchunk.rb +++ b/Formula/bchunk.rb @@ -1,13 +1,24 @@ -require 'formula' - class Bchunk < Formula - homepage 'http://he.fi/bchunk/' - url 'http://he.fi/bchunk/bchunk-1.2.0.tar.gz' - sha1 'a328e4665eb5e51df63d8d27d1d75ecc74bdef9e' + homepage "http://he.fi/bchunk/" + url "http://he.fi/bchunk/bchunk-1.2.0.tar.gz" + sha1 "a328e4665eb5e51df63d8d27d1d75ecc74bdef9e" def install system "make" - bin.install 'bchunk' - man1.install 'bchunk.1' + bin.install "bchunk" + man1.install "bchunk.1" + end + + test do + (testpath/"foo.cue").write <<-EOS.undent + foo.bin BINARY + TRACK 01 MODE1/2352 + INDEX 01 00:00:00 + EOS + + touch testpath/"foo.bin" + + system "#{bin}/bchunk", "foo.bin", "foo.cue", "foo" + assert File.exist? testpath/"foo01.iso" end end