Add another Erlang version format.
This commit is contained in:
parent
5ce1caa1f3
commit
7d61bfe88f
@ -97,6 +97,10 @@ class VersionParsingTests < Test::Unit::TestCase
|
|||||||
assert_version_detected 'R15B01', 'https://github.com/erlang/otp/tarball/OTP_R15B01'
|
assert_version_detected 'R15B01', 'https://github.com/erlang/otp/tarball/OTP_R15B01'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_yet_another_erlang_version_style
|
||||||
|
assert_version_detected 'R15B03-1', 'https://github.com/erlang/otp/tarball/OTP_R15B03-1'
|
||||||
|
end
|
||||||
|
|
||||||
def test_p7zip_version_style
|
def test_p7zip_version_style
|
||||||
assert_version_detected '9.04',
|
assert_version_detected '9.04',
|
||||||
'http://kent.dl.sourceforge.net/sourceforge/p7zip/p7zip_9.04_src_all.tar.bz2'
|
'http://kent.dl.sourceforge.net/sourceforge/p7zip/p7zip_9.04_src_all.tar.bz2'
|
||||||
@ -211,6 +215,10 @@ class VersionParsingTests < Test::Unit::TestCase
|
|||||||
assert_version_detected 'R15B01', 'https://downloads.sf.net/project/machomebrew/Bottles/erlang-R15B01.mountainlion.bottle.tar.gz'
|
assert_version_detected 'R15B01', 'https://downloads.sf.net/project/machomebrew/Bottles/erlang-R15B01.mountainlion.bottle.tar.gz'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_yet_another_erlang_bottle_style
|
||||||
|
assert_version_detected 'R15B03-1', 'https://downloads.sf.net/project/machomebrew/Bottles/erlang-R15B03-1.mountainlion.bottle.tar.gz'
|
||||||
|
end
|
||||||
|
|
||||||
def test_old_bottle_style
|
def test_old_bottle_style
|
||||||
assert_version_detected '4.7.3', 'https://downloads.sf.net/project/machomebrew/Bottles/qt-4.7.3-bottle.tar.gz'
|
assert_version_detected '4.7.3', 'https://downloads.sf.net/project/machomebrew/Bottles/qt-4.7.3-bottle.tar.gz'
|
||||||
end
|
end
|
||||||
|
|||||||
@ -128,7 +128,7 @@ class Version
|
|||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
|
# e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style)
|
||||||
m = /[-_](R\d+[AB]\d*)/.match(spec.to_s)
|
m = /[-_](R\d+[AB]\d*(-\d+)?)/.match(spec.to_s)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# e.g. boost_1_39_0
|
# e.g. boost_1_39_0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user