aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
AgeCommit message (Collapse)Author
2012-08-25tests: adjust test_bottle_spec_selection for new bottle codeJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-25Fix tests and NoMethodError with no X11 installed.Mike McQuaid
2012-08-25erlang: fix version detection and bottles.Mike McQuaid
2012-08-23Version: make MacOSVersion comparison more robustJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Test version interrogation methodsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Simplify version comparison testsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Version: build-in devel version comparisonsJack Nagel
The heuristic used by the default version comparison is simple. A version string is scanned for strings of digits, split into an array of these strings, and then an element-wise comparison is done. This fails when presented with something like Version.new("1.0.0beta7") <=> Version.new("1.0.0") because the first three digits match, and the fourth digit of the receiver (7) is greater than the assumed fourth digit of the parameter (0). Fix this by defining an element-wise comparator on a new VersionElement class. This allows us to correctly compare "alpha", "beta", and "rc" style version strings, and keeps the logic out of the main version comparison. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Add custom comparator for MacOS.versionJack Nagel
This will allow us to do comparisons like if MacOS.version >= :lion and hopefully deprecate the MacOS.<name>? family of methods, which are counterinitutive.
2012-08-18Add support for custom version schemesJack Nagel
A version scheme is a class that inherits from Version and reimplements Version#<=>. This will allow formulae to specify a custom comparison method that will be used instead of the default, for cases where the default is insufficient.
2012-08-18Add Version#detected_from_url?Jack Nagel
2012-08-18Replace version strings with Version objectsJack Nagel
2012-08-18Further version test refactoringJack Nagel
2012-08-18Move version detection to Version classJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Initial version comparison implementationJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18Preliminary version test refactoringJack Nagel
2012-08-12tests: require string extension before exceptionsJack Nagel
exceptions.rb now needs String#undent when it is loaded. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-09Deprecate ancient formula syntaxJack Nagel
Closes Homebrew/homebrew#13444. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-07Allow multiple unsatisfied fatal requirementsAdam Vandenberg
Closes Homebrew/homebrew#13335.
2012-07-05tests: expect that mirror lists are empty, not nilJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04tests: clean up whitespaceJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Demonstrate that bottles are selected correctlyJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Prune some requires from test filesJack Nagel
testing_env already requires utils; set up the ARGV and ENV extensions there as well. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Refactor checksummingJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04Introduce new formula specsJack Nagel
2012-06-16Teach Mach-O machinery about bundlesJack Nagel
c.f. Homebrew/homebrew#12810. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-15Improve Pathname#text_executable? regexpJack Nagel
file(1) does not allow leading whitespace on shebang lines, and there appears to be no restrictions on what characters follow '#!', either. While at it, fix an erroneous shebang test. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30cleaner: use new Mach-O pathname methods in clean_fileJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30archs_for_command: use new Mach-O Pathname methodsJack Nagel
- Reimplement archs_for_command on top of the new Mach-O methods - Move ArchitectureListExtension to mach.rb - Add a test for the ArchitectureListExtension Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30Pathname: add Mach-O moduleJack Nagel
The MachO module contains methods for learning about Mach-O binaries, and can be used where one might normally shell out to file(1). Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-24Change versioned bottle syntax and fix issues.Mike McQuaid
Fixed Homebrew/homebrew#11562.
2012-04-24Revert "Change versioned bottle syntax and fix issues."Mike McQuaid
This reverts commit f80908bead8b620ebcc5cdde9de65e70598002b6.
2012-04-24Change versioned bottle syntax and fix issues.Mike McQuaid
Fixed Homebrew/homebrew#11562.
2012-04-22Fix compiler selection tests on Xcode 4.2+Misty De Meo
MacOS.gcc_42_build_version is nil when not available, not 0
2012-04-20Hardware test: add :arrandaleMisty De Meo
For some reason :arrandale was missing from the list of hardware in the Intel family in the hardware test.
2012-04-18tests: add utility method to quell outputJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16tests: silence `zip` output in test_bucketJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16tests: silence test_detect_failed_configureJack Nagel
The standard `nostdout` method doesn't work here because Formula#system does some redirection of its own; both stdout and stderr have to be of the same type, so just do it manually here. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16tests: replace tests script with rake-based runnerJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16tests: setup and teardown cleanupsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14tests: reorganize compiler selection testsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14tests: bring `brew update` tests up to dateJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14tests: remove special-casing @path in TestBallJack Nagel
Tests that expect Formula#path to resolve to a real path should use TestBallWithRealPath; TestBall gets its original behavior back, fixing a failing test in test_formula_install. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-09tests: fix no-op fails_with testJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-07Clean up fails_with test classesJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06info: output correct URL for tapped dupesJack Nagel
Tapped formulae that dupe those in core now display the correct URL when invoked like `brew info homebrew/dupes/openssl`. This also fixes the broken `brew info` test. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06tests: silence mirror testJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06Fix protection against overriding Formula#brewJack Nagel
The test for this previously passed, but only because the constructor for SoftwareSpecification was raising an exception. method_added needs to be a class method because methods are being defined on the class, not the object, and to test it properly we have to eval the class in the test itself. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06Add test for ghc version styleJack Nagel
the ghc formula had an explicit version because we had trouble parsing the version from the 64-bit URL. It is working now, so add a test to ensure it isn't broken in the future. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01Reset compiler when testing fails_withJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01New fails_with infrastructureJack Nagel
- Formulae can now declare failures on any compiler. - FailsWithLLVM and associated formula elements have been moved to compat. Signed-off-by: Jack Nagel <jacknagel@gmail.com>