aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-09-29 20:35:10 +0100
committerMax Howell2009-09-29 23:34:17 +0100
commitc0253a75df93f67ae7a4ab14f1f0960b0b484556 (patch)
treecc8465b3a6b61aa00c93ff4c8fc176d55a143f9b /Library
parentcacf8d8aa4682ccb66738c98e93038a9a73b99be (diff)
downloadbrew-c0253a75df93f67ae7a4ab14f1f0960b0b484556.tar.bz2
Angband version style
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/pathname+yeast.rb2
-rwxr-xr-xLibrary/Homebrew/unittest.rb8
2 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/pathname+yeast.rb b/Library/Homebrew/pathname+yeast.rb
index 7feb83709..79dfcb549 100644
--- a/Library/Homebrew/pathname+yeast.rb
+++ b/Library/Homebrew/pathname+yeast.rb
@@ -142,7 +142,7 @@ class Pathname
return $1 if $1
# eg foobar-4.5.0-bin
- /-((\d+\.)+\d+)-(bin|src)$/.match stem
+ /-((\d+\.)+\d+[abc]?)-(bin|src)$/.match stem
return $1 if $1
# eg. otp_src_R13B (this is erlang's style)
diff --git a/Library/Homebrew/unittest.rb b/Library/Homebrew/unittest.rb
index 0968e8f5f..f7b3ad2c7 100755
--- a/Library/Homebrew/unittest.rb
+++ b/Library/Homebrew/unittest.rb
@@ -18,6 +18,7 @@ require 'update'
# these are defined in global.rb, but we don't want to break our actual
# homebrew tree, and we do want to test everything :)
HOMEBREW_PREFIX=Pathname.new '/private/tmp/testbrew/prefix'
+HOMEBREW_REPOSITORY=HOMEBREW_PREFIX
HOMEBREW_CACHE=HOMEBREW_PREFIX.parent+"cache"
HOMEBREW_CELLAR=HOMEBREW_PREFIX.parent+"cellar"
HOMEBREW_USER_AGENT="Homebrew"
@@ -589,6 +590,11 @@ class BeerTasting <Test::Unit::TestCase
end
end
+ def test_angband_version_style
+ f = MockFormula.new 'http://rephial.org/downloads/3.0/angband-3.0.9b-src.tar.gz'
+ assert_equal '3.0.9b', f.version
+ end
+
private
OUTSIDE_PREFIX = '/tmp'
@@ -607,7 +613,7 @@ class BeerTasting <Test::Unit::TestCase
end
@fixture_data
end
-
+
def test_ENV_options
ENV.gcc_4_0_1
ENV.gcc_4_2