Angband version style

This commit is contained in:
Max Howell 2009-09-29 20:35:10 +01:00
parent cacf8d8aa4
commit c0253a75df
2 changed files with 8 additions and 2 deletions

View File

@ -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)

View File

@ -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