3482 Commits

Author SHA1 Message Date
Jack Nagel
329f0a8490 Replace version strings with Version objects 2012-08-18 11:12:08 -05:00
Jack Nagel
43dc54e8b9 Further version test refactoring 2012-08-18 11:12:08 -05:00
Jack Nagel
5fe7fdf153 Move version detection to Version class
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:12:07 -05:00
Jack Nagel
956c1d653a Initial version comparison implementation
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-18 11:12:07 -05:00
Jack Nagel
969ce2f67d Preliminary version test refactoring 2012-08-18 11:12:07 -05:00
Jack Nagel
8818e008e3 tests: require string extension before exceptions
exceptions.rb now needs String#undent when it is loaded.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-12 01:02:37 -05:00
Jack Nagel
f5eaef0aee Deprecate ancient formula syntax
Closes Homebrew/homebrew#13444.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-08-09 23:56:54 -05:00
Adam Vandenberg
8c8701f268 Allow multiple unsatisfied fatal requirements
Closes Homebrew/homebrew#13335.
2012-08-07 10:49:45 -07:00
Jack Nagel
4ffc06f988 tests: expect that mirror lists are empty, not nil
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-05 20:33:28 -05:00
Jack Nagel
93f8c71e21 tests: clean up whitespace
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
40b531deb1 Demonstrate that bottles are selected correctly
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
90dbb8a141 Prune some requires from test files
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-04 22:47:34 -05:00
Jack Nagel
76b2eee777 Refactor checksumming
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:33 -05:00
Jack Nagel
98a11b8e57 Introduce new formula specs 2012-07-04 22:47:32 -05:00
Jack Nagel
2cca8e1a4f Teach Mach-O machinery about bundles
c.f. Homebrew/homebrew#12810.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-16 11:43:43 -05:00
Jack Nagel
7002359f7a Improve Pathname#text_executable? regexp
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-06-15 20:06:36 -05:00
Jack Nagel
2a6575ad28 cleaner: use new Mach-O pathname methods in clean_file
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-30 22:32:49 -05:00
Jack Nagel
53ce9dba53 archs_for_command: use new Mach-O Pathname methods
- 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-30 22:32:48 -05:00
Jack Nagel
a786178382 Pathname: add Mach-O module
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-05-30 22:32:48 -05:00
Mike McQuaid
ebe4e07fa3 Change versioned bottle syntax and fix issues.
Fixed Homebrew/homebrew#11562.
2012-04-24 18:53:45 +10:00
Mike McQuaid
4138d30428 Revert "Change versioned bottle syntax and fix issues."
This reverts commit f80908bead8b620ebcc5cdde9de65e70598002b6.
2012-04-24 18:10:08 +10:00
Mike McQuaid
40370e05bd Change versioned bottle syntax and fix issues.
Fixed Homebrew/homebrew#11562.
2012-04-24 18:08:14 +10:00
Misty De Meo
1fc97a81ec Fix compiler selection tests on Xcode 4.2+
MacOS.gcc_42_build_version is nil when not available, not 0
2012-04-22 13:52:49 -05:00
Misty De Meo
aed54ce966 Hardware test: add :arrandale
For some reason :arrandale was missing from the list of hardware in the
Intel family in the hardware test.
2012-04-20 10:44:19 -05:00
Jack Nagel
af7bf47e31 tests: add utility method to quell output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-18 15:16:00 -05:00
Jack Nagel
2e2a492045 tests: silence zip output in test_bucket
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:53:35 -05:00
Jack Nagel
6e203a280c tests: silence test_detect_failed_configure
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-16 23:45:44 -05:00
Jack Nagel
c44cb2710b tests: replace tests script with rake-based runner
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:08:32 -05:00
Jack Nagel
84a4935bb5 tests: setup and teardown cleanups
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:08:32 -05:00
Jack Nagel
1d0be89fa5 tests: reorganize compiler selection tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 15:27:45 -05:00
Jack Nagel
5d84df0210 tests: bring brew update tests up to date
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 00:00:04 -05:00
Jack Nagel
a64f417f36 tests: remove special-casing @path in TestBall
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-14 00:00:04 -05:00
Jack Nagel
f296683409 tests: fix no-op fails_with test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-09 17:45:35 -05:00
Jack Nagel
25a148d6a1 Clean up fails_with test classes
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-07 13:29:40 -05:00
Jack Nagel
d2c9b27e14 info: output correct URL for tapped dupes
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-06 23:54:41 -05:00
Jack Nagel
504756745b tests: silence mirror test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 22:06:05 -05:00
Jack Nagel
9614301be4 Fix protection against overriding Formula#brew
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-06 17:32:43 -05:00
Jack Nagel
d3ba9723b2 Add test for ghc version style
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-06 00:08:23 -05:00
Jack Nagel
bb8fcc8901 Reset compiler when testing fails_with
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01 14:56:04 -05:00
Jack Nagel
de444ead0b New fails_with infrastructure
- 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>
2012-04-01 12:39:59 -05:00
Jack Nagel
5dc15272d9 ENV: reset LD when switching compilers
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-21 12:22:22 -05:00
Adam Vandenberg
07736cb8fa Allow a different package and import name for language deps.
Some times the module to import is different than the module to install
when dealing with external dependencies. This change allows an optional
import name to be specififed when it is different from the module name.

Closes Homebrew/homebrew#11078.
2012-03-20 19:43:41 -07:00
Adam Vandenberg
975459a75c Add tests for patches.rb 2012-03-20 19:24:58 -07:00
Jack Nagel
6424cbf0de Update external deps tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-11 15:41:45 -05:00
Jack Nagel
8973d1dbcf Remove redundant versions and update version tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-11 15:18:56 -05:00
Mike McQuaid
4a306f32f4 Support bottles for non-Lion OSX versions. 2012-03-10 18:09:35 +13:00
Jack Nagel
fe25e4f7ec Fix typo in test_arch_for_command
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-09 11:50:27 -06:00
Mike McQuaid
a005834d7a Run tests from anywhere and provide an exit code. 2012-03-09 18:28:47 +13:00
Mike McQuaid
0e2258f0fa Fix test_ENV on 10.7/Xcode 4. 2012-03-09 16:49:19 +13:00
Mike McQuaid
31e2ec485b Fix test_arch_for_command on 10.7. 2012-03-09 16:49:19 +13:00