bottle_version: improve test filenames.
This commit is contained in:
parent
a35fb6a192
commit
ac81d3b0d8
@ -3,12 +3,12 @@ class BottleVersion < Version
|
|||||||
spec = Pathname.new(spec) unless spec.is_a? Pathname
|
spec = Pathname.new(spec) unless spec.is_a? Pathname
|
||||||
stem = spec.stem
|
stem = spec.stem
|
||||||
|
|
||||||
# e.g. perforce-2013.1.610569-x86_64
|
# e.g. perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz
|
||||||
m = /-([\d\.]+-x86(_64)?)/.match(stem)
|
m = /-([\d\.]+-x86(_64)?)/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
# e.g. ssh-copy-id-6.2p2.bottle.tar.gz
|
# e.g. ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz
|
||||||
# e.g. icu4c-52.1.bottle.tar.gz
|
# e.g. icu4c-52.1.mountain_lion.bottle.tar.gz
|
||||||
m = /(\d+\.(\d)+(p(\d)+)?)/.match(stem)
|
m = /(\d+\.(\d)+(p(\d)+)?)/.match(stem)
|
||||||
return m.captures.first unless m.nil?
|
return m.captures.first unless m.nil?
|
||||||
|
|
||||||
|
@ -18,6 +18,6 @@ class BottleVersionParsingTests < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_icu4c_style
|
def test_icu4c_style
|
||||||
assert_version_detected '52.1',
|
assert_version_detected '52.1',
|
||||||
'/usr/local/icu4c-52.1.bottle.tar.gz'
|
'/usr/local/icu4c-52.1.mavericks.bottle.tar.gz'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user