diff options
| author | Max Howell | 2009-08-10 18:16:12 +0100 |
|---|---|---|
| committer | Max Howell | 2009-08-10 18:16:12 +0100 |
| commit | e24e46c793c1dd93905e7aeef646388ff27028e6 (patch) | |
| tree | ac22e6eee0d846f746564c78f65892371de84e5d /Library | |
| parent | 6661f78618a640ac9570f2003df5c359d1027579 (diff) | |
| download | brew-e24e46c793c1dd93905e7aeef646388ff27028e6.tar.bz2 | |
TEST Zip'd archives can be extracted
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Homebrew/unittest.rb | 14 |
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' |
