aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
AgeCommit message (Collapse)Author
2013-06-15Avoid unnecessary float to string conversionJack Nagel
2013-06-14Run tests under actual OS versionJack Nagel
2013-06-14Use Hardware::CPU moduleJack Nagel
2013-06-12Remove unused variableJack Nagel
2013-06-11Check method existence rather than Ruby versionJack Nagel
2013-06-10Add failing test for a misdetected versionJack Nagel
2013-06-08Add :ld64 dependencyMisty De Meo
This allows formulae which won't build with Tiger's ld to conditionally request a dependency on the ld64 formula. This modifies the build environment appropriately, and will only be active on Tiger.
2013-06-08Merge repeated deps with differing optionsJack Nagel
When expanding dependencies, repeated deps are treated as equal and all but the first are discarded when #uniq is called on the resulting array. However, they may have different sets of options attached, so we cannot assume they are the same. After the initial expansion, we group them by name and then create a new Dependency object for each name, merging the options from each group. Fixes #20335.
2013-06-08Add Enumerable#group_byJack Nagel
2013-06-07test_dependency_expansion: dep names should always be stringsJack Nagel
2013-06-07Fix failing testJack Nagel
2013-06-06Decouple bottle tags from MacOS.catJack Nagel
2013-06-05Improve tokenization of version stringsJack Nagel
Tokens like "b4", "beta1", "p195", &c. are now treated as atoms rather than being broken down even further. Additionally, we enable support for padding in the middle of versions strings, so we can successfully compare something like "2.1-p195" with "2.1.0-p194" by inferring that "2.1" is really "2.1.0". This fixes the comparison "9.9.3-P1" > "9.9.3" which previously has not been handled correctly.
2013-06-05Add failing test for patchlevel version comparisonsJack Nagel
2013-06-04Extract attr_rw from Formula for reuseJack Nagel
Closes #20239.
2013-06-03Allow explicit conversion of requirements to depsJack Nagel
Fixes #19857.
2013-06-03Remove empty test fileJack Nagel
This breaks my test runner in weird ways.
2013-06-03Python 2.x and 3.x supportSamuel John
New `depends_on :python` Dependency. New `depends_on :python3` Dependency. To avoid having multiple formulae with endings -py2 and -py3, we will handle support for different pythons (2.x vs. 3.x) in the same formula. Further brewed vs. external python will be transparently supported. The formula also gets a new object `python`, which is false if no Python is available or the user has disabled it. Otherwise it is defined and provides several support methods: python.site_packages # the site-packages in the formula's Cellar python.global_site_packages python.binary # the full path to the python binary python.prefix python.version python.version.major python.version.minor python.xy # => e.g. "python2.7" python.incdir # includes of python python.libdir # the python dylib library python.pkg_config_path # used internally by brew python.from_osx? python.framework? python.universal? python.pypy? python.standard_caveats # Text to set PYTHONPATH for python.from_osx? python.if3then3 # => "" for 2.x and to "3" for 3.x. Further, to avoid code duplication, `python` takes an optional block that is run twice if the formula defines depends_on :python AND :python3. python do system python, 'setup.py', "--prefix=#{prefix}" end Read more in the Homebrew wiki.
2013-06-01test_mach: move helper method out of global namespaceJack Nagel
2013-06-01Require hardware where it is neededJack Nagel
2013-05-25Add tests for Formula#installed_prefixJack Nagel
2013-05-25tests: extract common formula helperJack Nagel
2013-05-21Fix CompilerSelector tests on systems that have gcc 4.0Jack Nagel
2013-05-20CompilerSelector: raise when no compatible compilerMisty De Meo
This replaces the old behaviour of falling back to the original compiler with no messaging. Fixes #19170. Fixes mistydemeo/tigerbrew#45.
2013-05-20Add test for ARGV.flag?Jack Nagel
2013-05-14test_keg: reduce noise by including FileUtilsJack Nagel
2013-05-14test_keg: make mode an ivarJack Nagel
2013-05-10Add type accessors to DependenciesJack Nagel
2013-05-10Refactor Dependency.expandJack Nagel
2013-05-10Reorganize compatJack Nagel
2013-05-09Overwrite broken symlinks with --overwriteDesmond Brand
Closes #19480. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-05-06Reduce allocations in dependency constructionJack Nagel
By always passing around a single, unnested array rather than splatting and then defensively flattening and compacting things, we can avoid allocating a bunch of unnecessary arrays. This gives a performance boost of roughly 4% when enumerating 2500 formulae, and has the side effect of cleaning up the dependency API.
2013-05-06TypeError is appropriate hereJack Nagel
2013-04-27Don't test error messageJack Nagel
Now that we are testing for a custom exception type, we don't need to make any assertion about the message.
2013-04-27Allow `brew versions` to work with underspecified formulaeJack Nagel
2013-04-26Add deps target to tests Rakefile for needed gems.Mike McQuaid
2013-04-24Add a couple more version testsJack Nagel
2013-04-24Split up big version detection testJack Nagel
2013-04-16Add tests for FormulaPin and simplify implementationJack Nagel
2013-04-15Don't create MacOS.version multiple timesJack Nagel
2013-04-13Remove extra requireJack Nagel
2013-04-13Use assert_operatorJack Nagel
2013-04-13Remove obsolete testsJack Nagel
This behavior is now tested at more appropriate levels in test_software_spec, test_formula_spec_selection, and test_formula_validation.
2013-04-13Make a specific assertion in this testJack Nagel
2013-04-13Raise a useful exception for incomplete formulaeJack Nagel
2013-04-13Add tests for formula spec selectionJack Nagel
These tests document the relative precedence of the stable, bottle, devel, and head specifications, and the conditions that can influence which is selected (e.g. command-line flags).
2013-04-13Allow "devel-only" formulaeJack Nagel
It seems only natural that this should be possible, or at the very least, it should not result in calling methods on nil.
2013-04-13Improved formula attribute validationJack Nagel
The initializer for Formula does a number of validations, but it does them in a weird order, and some attributes aren't validated under certain circumstances. This became even more of a mess when most software package attributes were moved into the SoftwareSpec class. This commit removes the last vestiges of storing these attributes as instance variables. In particular, it eliminates #set_instance_variable and #validate_variable, replacing them with methods that operate on SoftwareSpec instances, and generate more useful errors. Doing these validations unconditionally in the initializer means we bail out much earlier if the formula has invalid attributes or is not fully specified, and no longer need to validate in #prefix. Technically we don't need to validate in #brew either, but we continue to do so anyway as a safety measure, and because we cannot enforce calls to super in subclasses.
2013-04-13Clean up checksum verification testsJack Nagel
2013-04-10Eliminate test_bucketJack Nagel
Most of the behavior tested here is now tested elsewhere. Move the remaining useful tests to better places.