icu4c: add bottle regex.

This commit is contained in:
Mike McQuaid 2013-10-11 08:40:08 +01:00
parent 3f0a409ec5
commit 28a20b70fc
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,8 @@ class BottleVersion < Version
return m.captures.first unless m.nil?
# e.g. ssh-copy-id-6.2p2.bottle.tar.gz
m = /(\d\.(\d)+(p(\d)+)?)/.match(stem)
# e.g. icu4c-52.1.bottle.tar.gz
m = /(\d+\.(\d)+(p(\d)+)?)/.match(stem)
return m.captures.first unless m.nil?
super

View File

@ -15,4 +15,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
assert_version_detected '6.2p2',
'/usr/local/ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz'
end
def test_icu4c_style
assert_version_detected '52.1',
'/usr/local/icu4c-52.1.bottle.tar.gz'
end
end