bottle_version: add x264.

This commit is contained in:
Mike McQuaid 2014-02-22 17:15:15 +00:00
parent ac81d3b0d8
commit 0f2d1d7f72
2 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,10 @@ class BottleVersion < Version
m = /-([\d\.]+-x86(_64)?)/.match(stem)
return m.captures.first unless m.nil?
# e.g. x264-r2197.4.mavericks.bottle.tar.gz
m = /(r\d+\.\d)/.match(stem)
return m.captures.first unless m.nil?
# e.g. ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz
# e.g. icu4c-52.1.mountain_lion.bottle.tar.gz
m = /(\d+\.(\d)+(p(\d)+)?)/.match(stem)

View File

@ -20,4 +20,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
assert_version_detected '52.1',
'/usr/local/icu4c-52.1.mavericks.bottle.tar.gz'
end
def test_x264_style
assert_version_detected 'r2197.4',
'/usr/local/x264-r2197.4.mavericks.bottle.tar.gz'
end
end