aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
AgeCommit message (Collapse)Author
2012-12-16Add another Erlang version format.Mike McQuaid
2012-12-01Fix broken `brew cleanup` testsJack Nagel
2012-11-17tests: add profiling supportJack Nagel
`rake profile` will run ruby-prof on the test suite if the ruby-prof gem is installed.
2012-10-25tests: define assert_empty for Ruby <= 1.8Jack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25ComparableSet#merge returns selfJack Nagel
Set#merge is supposed to return self, and Formula#recursive_requirements depended on this being true. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25test_cleaner: add missing requireJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-25Allow requirements to record tagsJack Nagel
To allow depends_on :x11 => :optional and friends to work as expected, make requirements record any tags and add special handling to the X11Dependency to record both a minimum version and additional tags. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-23Fix Keg testsMisty De Meo
* unreverse expected/actuals * don't assume linked file order is guaranteed - it wasn't!
2012-10-20brew ln --force is now brew ln --overwriteMisty De Meo
* Renames --force to --overwrite, freeing up brew ln --force for #13349 * Changes --dry-run to preview linking by default, rather than overwriting. An overwrite dry-run can be simulated via both --dry-run --overwrite * Adds some basic Keg tests
2012-10-16Add Jenkins version matching (and test).Mike McQuaid
2012-10-15Test coverage for DownloadStrategyDetectorJack Nagel
While at it, make it use class methods instead; no reason to instantiate an object for this. Eventually there should be some functional tests for the individual strategies as well. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-15Manage Requirements using ComparableSetMisty De Meo
ComparableSet only allows a single object of a given class, choosing the object with the greatest value. This was mainly created for Requirements, so that, e.g., two X11Dependencies of differing strictness don't both end up in the same requirement set. Fixes #15240.
2012-09-29tests: set newly-visible global constantsJack Nagel
The changes to error ouput and logging require a few more things to be visible during installation tests. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27test_bucket: don't try to clean a non-existent kegJack Nagel
It is a no-op under Ruby 1.8 but Pathname#find raises ENOENT if the directory doesn't exist under 1.9. But we really shouldn't try to clean a non-existent keg anyway, and FormulaInstaller will have bailed out long before the clean step if the keg doesn't exist, so lets just not even test this condition; the cleaner has its own tests anyway. Alternatively we can adjust the cleaner to handle this case, but I don't see much value in that. n.b. with this, the tests now pass under 1.9.3 (for me), which is nice because I often run them on that version inadvertently. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27Adjust test expectation for 'LD'Jack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27Make FileUtils extension available globallyJack Nagel
Now that we are monkeypatching copy_metadata, we should load our extension up front for consistency. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03Stop warning in ENV.x11Jack Nagel
It has been long enough since `depends_on :x11` was introduced that we can make it the caller's responsibility to ensure X11 is present before invoking ENV.x11, so stop outputting a warning. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-30tests: avoid unnecessary chdirJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-29tests: support "rake rcov" if rcov is installedJack Nagel
If the rcov gem is installed, `rake rcov` will generate a test coverage report in the coverage directory. I picked rcov because it is 1.8 compatible. But it could easily be swapped out for another coverage tool. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-29tests: adjust expectations for 'opt' directoryJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
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 #13444. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-07Allow multiple unsatisfied fatal requirementsAdam Vandenberg
Closes #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. #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 #11562.