aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-10-11 08:40:08 +0100
committerMike McQuaid2013-10-11 08:40:19 +0100
commit28a20b70fc6874e6b3329e729bd199816281ed4a (patch)
tree04876a609f4801a936a07ad1bfae3dc1e059aa4d /Library
parent3f0a409ec5dff27e516faf0a282f76be99187b99 (diff)
downloadbrew-28a20b70fc6874e6b3329e729bd199816281ed4a.tar.bz2
icu4c: add bottle regex.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/bottle_version.rb3
-rw-r--r--Library/Homebrew/test/test_bottle_versions.rb5
2 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/bottle_version.rb b/Library/Homebrew/bottle_version.rb
index 477863297..0711dc349 100644
--- a/Library/Homebrew/bottle_version.rb
+++ b/Library/Homebrew/bottle_version.rb
@@ -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
diff --git a/Library/Homebrew/test/test_bottle_versions.rb b/Library/Homebrew/test/test_bottle_versions.rb
index b0b061d67..7624f448a 100644
--- a/Library/Homebrew/test/test_bottle_versions.rb
+++ b/Library/Homebrew/test/test_bottle_versions.rb
@@ -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