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
commitfc5bac7e5728be6fb473757361d167facdfcab87 (patch)
tree7cd07153a62f9e0cff564e8816bbdc667506afd5 /Library/Homebrew
parent8911b09a3712a5f769a5c7017fe55878d5c77d2f (diff)
downloadhomebrew-fc5bac7e5728be6fb473757361d167facdfcab87.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