aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMax Howell2009-06-18 09:52:38 +0100
committerMax Howell2009-06-18 10:31:23 +0100
commit6e9a56402181cd23ac085e923a7a46bf4f502850 (patch)
treec7ac0c1b9de67b513a40cdf532e91a7281de8c84 /Library/Homebrew
parentcae8fb295caa4afc213ee8f0455f97ca52ea84d3 (diff)
downloadbrew-6e9a56402181cd23ac085e923a7a46bf4f502850.tar.bz2
foobar-1.2.1rc1 version pattern
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/brewkit.rb2
-rwxr-xr-xLibrary/Homebrew/unittest.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb
index 95243810c..678655274 100644
--- a/Library/Homebrew/brewkit.rb
+++ b/Library/Homebrew/brewkit.rb
@@ -70,7 +70,7 @@ def extract_version basename
return $1 if $1
# eg. foobar-4.5.1b
- /-((\d+\.)*\d+[abc])$/.match basename
+ /-((\d+\.)*\d+([abc]|rc\d))$/.match basename
return $1 if $1
# eg. foobar4.5.1
diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb
index da2fedb88..68856baef 100755
--- a/Library/Homebrew/unittest.rb
+++ b/Library/Homebrew/unittest.rb
@@ -47,6 +47,11 @@ class BeerTasting <Test::Unit::TestCase
assert_equal '1.23', r.version
end
+ def test_version_libvorbis
+ r=TestFormula.new "http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.2rc1.tar.bz2"
+ assert_equal '1.2.2rc1', r.version
+ end
+
def test_dos2unix
r=TestFormula.new "http://www.sfr-fresh.com/linux/misc/dos2unix-3.1.tar.gz"
assert_equal '3.1', r.version