mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Test for astyle versioning
This commit is contained in:
parent
92154225dc
commit
b3b78eceeb
@ -77,9 +77,11 @@ def extract_version basename
|
|||||||
/((\d+\.)*\d+)$/.match basename
|
/((\d+\.)*\d+)$/.match basename
|
||||||
return $1 if $1
|
return $1 if $1
|
||||||
|
|
||||||
# eg. (erlang) otp_src_R13B
|
# eg. otp_src_R13B (this is erlang's style)
|
||||||
/^.*[-_.](.*)$/.match basename
|
# eg. astyle_1.23_macosx.tar.gz
|
||||||
return $1 if $1
|
basename.scan /_([^_]+)/ do |match|
|
||||||
|
return match.first if /\d/.match $1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,6 +34,11 @@ class BeerTasting <Test::Unit::TestCase
|
|||||||
assert_equal 'R13B', r.version
|
assert_equal 'R13B', r.version
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_astyle_verson_style
|
||||||
|
r=TestFormula.new "http://kent.dl.sourceforge.net/sourceforge/astyle/astyle_1.23_macosx.tar.gz"
|
||||||
|
assert_equal '1.23', r.version
|
||||||
|
end
|
||||||
|
|
||||||
def test_dos2unix
|
def test_dos2unix
|
||||||
r=TestFormula.new "http://www.sfr-fresh.com/linux/misc/dos2unix-3.1.tar.gz"
|
r=TestFormula.new "http://www.sfr-fresh.com/linux/misc/dos2unix-3.1.tar.gz"
|
||||||
assert_equal '3.1', r.version
|
assert_equal '3.1', r.version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user