diff options
| author | Baptiste Fontaine | 2015-01-18 19:49:29 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-18 21:34:25 +0100 |
| commit | 635b37c72ff80a02059833ef9b5542f87b2afe27 (patch) | |
| tree | 46e8bca47e25e905a437c327a37c38bd7ec53b7d /Library/Formula | |
| parent | 61c4226535bc051f75e8100c7188dea48b3c3b2f (diff) | |
| download | homebrew-635b37c72ff80a02059833ef9b5542f87b2afe27.tar.bz2 | |
cabextract: test added
Closes #36006.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/cabextract.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Formula/cabextract.rb b/Library/Formula/cabextract.rb index f2b19eba6..2ce114843 100644 --- a/Library/Formula/cabextract.rb +++ b/Library/Formula/cabextract.rb @@ -1,5 +1,3 @@ -require "formula" - class Cabextract < Formula homepage "http://www.cabextract.org.uk/" url "http://www.cabextract.org.uk/cabextract-1.4.tar.gz" @@ -17,4 +15,16 @@ class Cabextract < Formula "--prefix=#{prefix}" system "make", "install" end + + test do + # probably the smallest valid .cab file + cab = <<-EOS.gsub(/\s+/, "") + 4d5343460000000046000000000000002c000000000000000301010001000000d20400003 + e00000001000000000000000000000000003246899d200061000000000000000000 + EOS + (testpath/"test.cab").binwrite [cab].pack("H*") + + system "#{bin}/cabextract", "test.cab" + assert File.exist? "a" + end end |
