bottle_version: support fontforge scheme.
This commit is contained in:
parent
d6483c963a
commit
6ef3bab4a3
@ -29,6 +29,10 @@ class BottleVersion < Version
|
|||||||
m = /-(\d+_\d+(_\d+)+)/.match(stem)
|
m = /-(\d+_\d+(_\d+)+)/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
|
# e.g. 20120731 from fontforge-20120731.mavericks.bottle.tar.gz
|
||||||
|
m = /-(\d+)/.match(stem)
|
||||||
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -45,4 +45,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
|
|||||||
assert_version_detected '00-5.0.5',
|
assert_version_detected '00-5.0.5',
|
||||||
'/usr/local/zpython-00-5.0.5.mavericks.bottle.tar.gz'
|
'/usr/local/zpython-00-5.0.5.mavericks.bottle.tar.gz'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_fontforge_style
|
||||||
|
assert_version_detected '20120731',
|
||||||
|
'/usr/local/fontforge-20120731.mavericks.bottle.tar.gz'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user