aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-08-10 18:16:12 +0100
committerMax Howell2009-08-10 18:16:12 +0100
commit408762e6c2388edb9ed1958b423deacbdb3fe769 (patch)
tree11cf89d89d5ef7d4bf2493598b19d24639932121 /Library
parentca0d50a00679d5fd0c9879db7cc6804d6ea36b41 (diff)
downloadhomebrew-408762e6c2388edb9ed1958b423deacbdb3fe769.tar.bz2
TEST Zip'd archives can be extracted
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/unittest.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb
index bdf383533..1736a6fa9 100755
--- a/Library/Homebrew/unittest.rb
+++ b/Library/Homebrew/unittest.rb
@@ -35,13 +35,21 @@ class TestBall <Formula
@url="file:///#{Pathname.new(__FILE__).parent.realpath}/testball-0.1.tbz"
super "testball"
end
-
def install
prefix.install "bin"
prefix.install "libexec"
end
end
+class TestZip <Formula
+ def initialize
+ path=HOMEBREW_CACHE.parent+'test-0.1.zip'
+ Kernel.system 'zip', '-0', path, __FILE__
+ @url="file://#{path}"
+ super 'testzip'
+ end
+end
+
class TestBallValidMd5 <TestBall
@md5='71aa838a9e4050d1876a295a9e62cbe6'
end
@@ -261,6 +269,10 @@ class BeerTasting <Test::Unit::TestCase
nostdout { assert_raises(ExecutionError) { f.brew } }
end
+ def test_zip
+ nostdout { assert_nothing_raised { TestZip.new.brew {} } }
+ end
+
def test_no_ARGV_dupes
ARGV.unshift'foo'
ARGV.unshift'foo'