Suppress ambiguous argument and grouped expression warnings
This commit is contained in:
parent
593289a018
commit
d994c6cdda
@ -10,7 +10,7 @@ module Homebrew extend self
|
||||
if ARGV.json == "v1"
|
||||
print_json
|
||||
elsif ARGV.flag? '--github'
|
||||
exec_browser *ARGV.formulae.map { |f| github_info(f) }
|
||||
exec_browser(*ARGV.formulae.map { |f| github_info(f) })
|
||||
else
|
||||
print_info
|
||||
end
|
||||
|
@ -143,7 +143,7 @@ class BeerTasting < Test::Unit::TestCase
|
||||
FileUtils.cp ABS__FILE__, abcd
|
||||
installed_paths=HOMEBREW_PREFIX.install abcd
|
||||
abcd = installed_paths[0]
|
||||
assert (HOMEBREW_PREFIX+orig_abcd.basename).exist?
|
||||
assert((HOMEBREW_PREFIX+orig_abcd.basename).exist?)
|
||||
assert abcd.exist?
|
||||
assert_equal HOMEBREW_PREFIX+'abcd', abcd
|
||||
|
||||
@ -191,6 +191,6 @@ class BeerTasting < Test::Unit::TestCase
|
||||
assert f == f
|
||||
assert f == g
|
||||
assert f.eql? f
|
||||
assert (not (f.eql? g))
|
||||
assert !f.eql?(g)
|
||||
end
|
||||
end
|
||||
|
@ -108,8 +108,8 @@ class FormulaTests < Test::Unit::TestCase
|
||||
when :lion then 'baadf00d'*5
|
||||
when :mountain_lion then '8badf00d'*5
|
||||
end, f.bottle.checksum.hexdigest
|
||||
assert_match /[0-9a-fA-F]{40}/, f.stable.checksum.hexdigest
|
||||
assert_match /[0-9a-fA-F]{64}/, f.devel.checksum.hexdigest
|
||||
assert_match(/[0-9a-fA-F]{40}/, f.stable.checksum.hexdigest)
|
||||
assert_match(/[0-9a-fA-F]{64}/, f.devel.checksum.hexdigest)
|
||||
|
||||
assert_equal 1, f.stable.mirrors.length
|
||||
assert f.bottle.mirrors.empty?
|
||||
|
@ -71,7 +71,7 @@ class InstallTests < Test::Unit::TestCase
|
||||
keg=Keg.new f.prefix
|
||||
keg.link
|
||||
assert_equal 3, HOMEBREW_PREFIX.children.length
|
||||
assert (HOMEBREW_PREFIX+'bin').directory?
|
||||
assert((HOMEBREW_PREFIX+'bin').directory?)
|
||||
assert_equal 3, (HOMEBREW_PREFIX+'bin').children.length
|
||||
end
|
||||
end
|
||||
|
@ -16,7 +16,7 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert !pn.mach_o_executable?
|
||||
assert !pn.text_executable?
|
||||
assert pn.arch == :universal
|
||||
assert_match /Mach-O (64-bit )?dynamically linked shared library/, file(pn)
|
||||
assert_match(/Mach-O (64-bit )?dynamically linked shared library/, file(pn))
|
||||
end
|
||||
|
||||
def test_i386_dylib
|
||||
@ -30,7 +30,7 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert !pn.mach_o_executable?
|
||||
assert !pn.text_executable?
|
||||
assert !pn.mach_o_bundle?
|
||||
assert_match /Mach-O dynamically linked shared library/, file(pn)
|
||||
assert_match(/Mach-O dynamically linked shared library/, file(pn))
|
||||
end
|
||||
|
||||
def test_x86_64_dylib
|
||||
@ -44,7 +44,7 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert !pn.mach_o_executable?
|
||||
assert !pn.text_executable?
|
||||
assert !pn.mach_o_bundle?
|
||||
assert_match /Mach-O 64-bit dynamically linked shared library/, file(pn)
|
||||
assert_match(/Mach-O 64-bit dynamically linked shared library/, file(pn))
|
||||
end
|
||||
|
||||
def test_mach_o_executable
|
||||
@ -58,7 +58,7 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert pn.mach_o_executable?
|
||||
assert !pn.text_executable?
|
||||
assert !pn.mach_o_bundle?
|
||||
assert_match /Mach-O (64-bit )?executable/, file(pn)
|
||||
assert_match(/Mach-O (64-bit )?executable/, file(pn))
|
||||
end
|
||||
|
||||
def test_fat_bundle
|
||||
@ -72,7 +72,7 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert !pn.mach_o_executable?
|
||||
assert !pn.text_executable?
|
||||
assert pn.mach_o_bundle?
|
||||
assert_match /Mach-O (64-bit )?bundle/, file(pn)
|
||||
assert_match(/Mach-O (64-bit )?bundle/, file(pn))
|
||||
end
|
||||
|
||||
def test_i386_bundle
|
||||
@ -86,7 +86,7 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert !pn.mach_o_executable?
|
||||
assert !pn.text_executable?
|
||||
assert pn.mach_o_bundle?
|
||||
assert_match /Mach-O bundle/, file(pn)
|
||||
assert_match(/Mach-O bundle/, file(pn))
|
||||
end
|
||||
|
||||
def test_x86_64_bundle
|
||||
@ -100,7 +100,7 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert !pn.mach_o_executable?
|
||||
assert !pn.text_executable?
|
||||
assert pn.mach_o_bundle?
|
||||
assert_match /Mach-O 64-bit bundle/, file(pn)
|
||||
assert_match(/Mach-O 64-bit bundle/, file(pn))
|
||||
end
|
||||
|
||||
def test_non_mach_o
|
||||
@ -115,8 +115,8 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert !pn.text_executable?
|
||||
assert !pn.mach_o_bundle?
|
||||
assert pn.arch == :dunno
|
||||
assert_no_match /Mach-O (64-bit )?dynamically linked shared library/, file(pn)
|
||||
assert_no_match /Mach-O [^ ]* ?executable/, file(pn)
|
||||
assert_no_match(/Mach-O (64-bit )?dynamically linked shared library/, file(pn))
|
||||
assert_no_match(/Mach-O [^ ]* ?executable/, file(pn))
|
||||
end
|
||||
|
||||
def test_architecture_list_extension
|
||||
@ -125,13 +125,13 @@ class MachOPathnameTests < Test::Unit::TestCase
|
||||
assert archs.universal?
|
||||
archs.remove_ppc!
|
||||
assert_equal 2, archs.length
|
||||
assert_match /-arch i386/, archs.as_arch_flags
|
||||
assert_match /-arch x86_64/, archs.as_arch_flags
|
||||
assert_match(/-arch i386/, archs.as_arch_flags)
|
||||
assert_match(/-arch x86_64/, archs.as_arch_flags)
|
||||
|
||||
pn = Pathname.new("#{TEST_FOLDER}/mach/fat.dylib")
|
||||
assert pn.archs.universal?
|
||||
assert_match /-arch i386/, pn.archs.as_arch_flags
|
||||
assert_match /-arch x86_64/, pn.archs.as_arch_flags
|
||||
assert_match(/-arch i386/, pn.archs.as_arch_flags)
|
||||
assert_match(/-arch x86_64/, pn.archs.as_arch_flags)
|
||||
end
|
||||
end
|
||||
|
||||
@ -153,7 +153,7 @@ class TextExecutableTests < Test::Unit::TestCase
|
||||
assert pn.text_executable?
|
||||
assert_equal [], pn.archs
|
||||
assert pn.arch == :dunno
|
||||
assert_match /text executable/, file(pn)
|
||||
assert_match(/text executable/, file(pn))
|
||||
end
|
||||
|
||||
def test_shebang_with_options
|
||||
@ -169,7 +169,7 @@ class TextExecutableTests < Test::Unit::TestCase
|
||||
assert pn.text_executable?
|
||||
assert_equal [], pn.archs
|
||||
assert pn.arch == :dunno
|
||||
assert_match /text executable/, file(pn)
|
||||
assert_match(/text executable/, file(pn))
|
||||
end
|
||||
|
||||
def test_malformed_shebang
|
||||
@ -185,6 +185,6 @@ class TextExecutableTests < Test::Unit::TestCase
|
||||
assert !pn.text_executable?
|
||||
assert_equal [], pn.archs
|
||||
assert pn.arch == :dunno
|
||||
assert_no_match /text executable/, file(pn)
|
||||
assert_no_match(/text executable/, file(pn))
|
||||
end
|
||||
end
|
||||
|
@ -15,21 +15,20 @@ class VersionComparisonTests < Test::Unit::TestCase
|
||||
include VersionAssertions
|
||||
|
||||
def test_version_comparisons
|
||||
assert_equal 0, version('0.1') <=> version('0.1.0')
|
||||
assert_equal -1, version('0.1') <=> version('0.2')
|
||||
assert_equal 1, version('1.2.3') <=> version('1.2.2')
|
||||
assert_equal 1, version('1.2.3-p34') <=> version('1.2.3-p33')
|
||||
assert_equal -1, version('1.2.4') <=> version('1.2.4.1')
|
||||
assert_equal 0, version('HEAD') <=> version('HEAD')
|
||||
assert_equal 1, version('HEAD') <=> version('1.2.3')
|
||||
assert_equal -1, version('1.2.3') <=> version('HEAD')
|
||||
assert_equal -1, version('3.2.0b4') <=> version('3.2.0')
|
||||
assert_equal -1, version('1.0beta6') <=> version('1.0b7')
|
||||
assert_equal -1, version('1.0b6') <=> version('1.0beta7')
|
||||
assert_equal -1, version('1.1alpha4') <=> version('1.1beta2')
|
||||
assert_equal -1, version('1.1beta2') <=> version('1.1rc1')
|
||||
assert_equal -1, version('1.0.0beta7') <=> version('1.0.0')
|
||||
assert_equal 1, version('3.2.1') <=> version('3.2beta4')
|
||||
assert version('0.1') == version('0.1.0')
|
||||
assert version('0.1') < version('0.2')
|
||||
assert version('1.2.3') > version('1.2.2')
|
||||
assert version('1.2.3-p34') > version('1.2.3-p33')
|
||||
assert version('1.2.4') < version('1.2.4.1')
|
||||
assert version('HEAD') > version('1.2.3')
|
||||
assert version('1.2.3') < version('HEAD')
|
||||
assert version('3.2.0b4') < version('3.2.0')
|
||||
assert version('1.0beta6') < version('1.0b7')
|
||||
assert version('1.0b6') < version('1.0beta7')
|
||||
assert version('1.1alpha4') < version('1.1beta2')
|
||||
assert version('1.1beta2') < version('1.1rc1')
|
||||
assert version('1.0.0beta7') < version('1.0.0')
|
||||
assert version('3.2.1') > version('3.2beta4')
|
||||
assert_nil version('1.0') <=> 'foo'
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user