20 Commits

Author SHA1 Message Date
Jack Nagel
1027093eae tests: set newly-visible global constants
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-29 12:14:57 -05:00
Jack Nagel
2ff6c40735 Add support for custom version schemes
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-18 11:12:09 -05:00
Jack Nagel
e57122780e Add Version#detected_from_url? 2012-08-18 11:12:09 -05:00
Jack Nagel
329f0a8490 Replace version strings with Version objects 2012-08-18 11:12:08 -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
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
1d0be89fa5 tests: reorganize compiler selection tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 15:27:45 -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
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
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
Charlie Sharpsteen
3ada407922 mirror support: Add test 2011-09-19 09:25:02 -07:00
Max Howell
768910283a Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00
Adam Vandenberg
31ebf6a293 Split out some Formula tests. 2010-04-06 08:27:12 -07:00