diff options
| author | Dominyk Tiller | 2015-01-07 21:22:36 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-08 10:07:02 +0000 |
| commit | 9937abbd3adc5f0e1de85b1ce07262f7b634a436 (patch) | |
| tree | a79049852b8c37d7fe27d0feaebbc07a8a461b22 /Library/Formula | |
| parent | 0128557a67c7a76a4878e240145afe5b18eb7dfb (diff) | |
| download | homebrew-9937abbd3adc5f0e1de85b1ce07262f7b634a436.tar.bz2 | |
atool: added test
Modernises the formula, and adds a two-part test.
The first part of the test creates a tarball from two files, and the
second part of the test looks inside that tarball without actually
untarring it to inspect its contents, which we then verify are correct
and expected.
Closes #35637.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/atool.rb | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Library/Formula/atool.rb b/Library/Formula/atool.rb index 48a69c122..b07f93fe9 100644 --- a/Library/Formula/atool.rb +++ b/Library/Formula/atool.rb @@ -1,12 +1,22 @@ -require 'formula' - class Atool < Formula - homepage 'http://www.nongnu.org/atool/' - url 'http://savannah.nongnu.org/download/atool/atool-0.39.0.tar.gz' - sha1 '40865bdc533f95fcaffdf8002889eb2ac67224a9' + homepage "https://savannah.nongnu.org/projects/atool/" + url "http://savannah.nongnu.org/download/atool/atool-0.39.0.tar.gz" + sha1 "40865bdc533f95fcaffdf8002889eb2ac67224a9" def install system "./configure", "--prefix=#{prefix}" - system "make install" + system "make", "install" + end + + test do + mkdir "apple_juice" + cd testpath/"apple_juice" do + touch "example.txt" + touch "example2.txt" + system bin/"apack", "test.tar.gz", "example.txt", "example2.txt" + end + output = shell_output("#{bin}/als #{testpath}/apple_juice/test.tar.gz") + assert output.include? "example.txt" + assert output.include? "example2.txt" end end |
