foobar-1.2.1rc1 version pattern

This commit is contained in:
Max Howell 2009-06-18 09:52:38 +01:00
parent cae8fb295c
commit 6e9a564021
2 changed files with 6 additions and 1 deletions

View File

@ -70,7 +70,7 @@ def extract_version basename
return $1 if $1 return $1 if $1
# eg. foobar-4.5.1b # eg. foobar-4.5.1b
/-((\d+\.)*\d+[abc])$/.match basename /-((\d+\.)*\d+([abc]|rc\d))$/.match basename
return $1 if $1 return $1 if $1
# eg. foobar4.5.1 # eg. foobar4.5.1

View File

@ -47,6 +47,11 @@ class BeerTasting <Test::Unit::TestCase
assert_equal '1.23', r.version assert_equal '1.23', r.version
end 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 def test_dos2unix
r=TestFormula.new "http://www.sfr-fresh.com/linux/misc/dos2unix-3.1.tar.gz" r=TestFormula.new "http://www.sfr-fresh.com/linux/misc/dos2unix-3.1.tar.gz"
assert_equal '3.1', r.version assert_equal '3.1', r.version