aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorSteffen Matthischke2014-03-19 16:45:20 +0100
committerMike McQuaid2014-03-19 16:06:37 +0000
commita1993bc82dea999c76744b42afa5c710dd02a51b (patch)
tree0fca44ae7fd7f8861b65e2fbea5dee60ed54c4c3 /Library/Formula
parentbd3f9b9c537e37e516610627d0a1a7e8ce814952 (diff)
downloadhomebrew-a1993bc82dea999c76744b42afa5c710dd02a51b.tar.bz2
unrar 5.1.1
Closes #27696. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/unrar.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/Library/Formula/unrar.rb b/Library/Formula/unrar.rb
index 6dcbae2c4..833564ddb 100644
--- a/Library/Formula/unrar.rb
+++ b/Library/Formula/unrar.rb
@@ -2,11 +2,25 @@ require 'formula'
class Unrar < Formula
homepage 'http://www.rarlab.com'
- url 'http://www.rarlab.com/rar/unrarsrc-5.0.14.tar.gz'
- sha1 'f6826b330668698fca227b3331e2bab564932d7e'
+ url 'http://www.rarlab.com/rar/unrarsrc-5.1.1.tar.gz'
+ sha1 '7d1a8691336208d1d9b85812ba7d5336d2986376'
def install
system "make"
bin.install 'unrar'
end
+
+ test do
+ contentpath = "directory/file.txt"
+ rarpath = testpath/"archive.rar"
+ data = 'UmFyIRoHAM+QcwAADQAAAAAAAACaCHQggDIACQAAAAkAAAADtPej1LZwZE' +
+ 'QUMBIApIEAAGRpcmVjdG9yeVxmaWxlLnR4dEhvbWVicmV3CsQ9ewBABwA='
+
+ rarpath.write data.unpack('m')
+ assert_equal contentpath, `#{bin}/unrar lb #{rarpath}`.strip
+ assert_equal 0, $?.exitstatus
+
+ system "#{bin}/unrar", "x", rarpath, testpath
+ assert_equal "Homebrew\n", (testpath/contentpath).read
+ end
end