1899 Commits

Author SHA1 Message Date
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
Max Howell
b63ec18564 Proper single character switch handling
Includes a test. So now you can do `brew cleanup -ns` and it will work.
2012-03-06 20:28:06 +00:00
Jack Nagel
19a0aa51a1 Adjust updater tests for git config calls
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-05 12:35:55 -06:00
Second Planet
8a4cb8c0ac Add more external dep options
* Chicken Scheme
* Node.js
* Rubinius

Closes Homebrew/homebrew#8466.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-25 10:19:59 -08:00
Adam Vandenberg
847a2732ee Update return values of install and install_symlink
These now return an Array of all the target destinations.
Previously, if a single argument was passed a single non-
Array was returned.

This behavior has been changed so that an Array is always returned
even for a single argument.

Updated the test.

Hopefully this won't break any custom code out there.
2012-02-17 23:07:16 -08:00
Jack Nagel
e251e5e4ec Adjust ARGV tests
ARGV.kegs and ARGV.formulae no longer raise exceptions.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:34:22 -06:00
Jack Nagel
b3092ea3f7 Fix failing ENV tests
We need the ARGV extension now that we call ARGV.build_bottle? in
set_cpu_cflags.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 21:20:13 -06:00
Max Howell
9a774ac0a6 Fix libinet version detection 2012-01-14 03:48:03 +00:00
Jack Nagel
ae4ea06e22 pathname: recognize ".cpio.*" double extensions
Just a cosmetic nicety.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-12 20:31:47 -06:00
Jack Nagel
826064880e tests: add missing require to test_ENV
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-01 23:58:15 -06:00
Jack Nagel
ffd5b7d7ab Add support for xz-compressed tarballs
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.

If XZUtils isn't installed, we abort and prompt the user to `brew
install xz`.

The `xz` command itself doesn't do any untarring, so we write the
decompressed archive to stdout and pipe it to tar.
2011-12-09 16:16:46 -06:00
Jack Nagel
dec66e951a update: correct failing tests
Commit dec4b73aa0 ("Allow `brew update --rebase`") changed the format of
the `git pull` command slightly, introducing an extra space (to allow
for the --rebase option), so let's update the test expectations for this.

We still need to write tests for '--rebase', but in the meantime they
once again pass for the normal case.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:37:36 -05:00
Jack Nagel
27d2a95e8f Correctly parse ImageMagick bottle version
Commit 2695821e98 ("Only use the bottle if its version is up-to-date")
essentially broke the ImageMagick bottle, because the version parsing
logic returns "1" as the bottle version.

Fixing this requires only a slight modification to the bottle URL regex;
includes a test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:29:14 -05:00
Charlie Sharpsteen
3ada407922 mirror support: Add test 2011-09-19 09:25:02 -07:00
Chris Ledet
f1cd284f12 Add :sandybridge to hardware_family test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-08 21:29:51 -05:00
Jack Nagel
eb52b97a1e tests: actually use bzip for test tarball
I inadvertently gzipped it last night. That in itself doesn't cause any
tests to fail because the download strategy code is robust, but it's
fixed here anyway to be consistent. Basically, I'm dumb.

I also took the opportunity to remove the other resource fork file, so
the tarball is clean.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 11:45:56 -05:00
Jack Nagel
23dbe43fb7 tests: fix failing test_a_basic_install
The test_a_basic_install was failing because it expected
libexec.children.length to be 1, when in fact there were two files in
the untarred libexec: NOOP, and the Mac OS X resource fork file ._NOOP.

That file is now removed, and the test passes.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 01:20:56 -05:00
Jack Nagel
c8d4af5611 update: bring tests up-to-date
The tests for update have been neglected during the last few rounds of
changes, so fix them up.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 00:55:20 -05:00
Max Howell
19e387d92e brew upgrade
Consequence: you can no longer install when something is already installed, you must upgrade it. This doesn't apply if the formula in question was unlinked. You can still --force installs though.

Rationale: the old way of installing over the top would leave symlinks to multiple versions in /usr/local if the old version had a file the newer version didn't. The new upgrade command handles everything properly.
2011-08-24 22:30:43 +01:00
Max Howell
42cc28597c HOMEBREW_CURL_ARGS so that tests can be more silent 2011-08-24 22:30:43 +01:00
Mike McQuaid
23769d62ad Fix brew bottle versioning. 2011-06-21 19:04:17 +01:00
Mislav Marohnić
8c521ca3d0 refactor update command to use git diff instead of parsing pull output
This fixes reporting of which formulae changed in git versions where `pull`
output is not compatible.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-14 14:47:39 -07:00
Mislav Marohnić
5fdb145e76 enable updater tests to be run on their own
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-14 14:47:33 -07:00
Austin Ziegler
007b9e72d5 Adding version detection to sf.net /download urls
SourceForge links can end with /download which appears to be part of
what is used to drive mirror selection. Modifying the version detection
extension of pathname.rb to detect this case for both sourceforge.net
and sf.net download selections.

This is sufficient for version detection but may not be sufficient for
other uses of /download links. I have not found any problems with links
that use /download, though.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-25 22:30:10 -07:00
Max Howell
c1a3b724fd Some Cleanup 2011-03-12 11:55:03 -08:00
Adam Vandenberg
b13baedfd8 Move string extensions 2011-03-12 11:55:03 -08: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
Michael Morgan
3ea550100f extract undent test to test case
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-17 21:13:16 -07:00
Bo Borgerson
80e17cde57 test_updater: Make fixture internally consistent
The update_git_pull_output_with_formulae_changes fixture (which consists
of mocked-up `git pull` output) listed a few files as both updated and
deleted.  This caused the test_update_homebrew_with_formulae_changes test to
fail.  My guess is that this fixture was mocked-up before formula deletion
handling was introduced, and became broken when it was.  This revision just
makes this fixture internally consistent, and allows the associated test to
pass.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-09-15 09:36:27 -07:00
lukas
bd6fb10361 Fixed recognition of versions like 'foobar-4.50-beta' in Pathname#version
Sphinx currently has a download name 'http://sphinxsearch.com/downloads/sphinx-1.10-beta.tar.gz', which homebrew currently can't correctly identify - with a small change to the regex for 'foobar-4.5.0-beta1' (make that trailing number optional) - it works like a charm.

Signed-off-by: David Höppner <0xffea@gmail.com>
2010-08-27 17:53:06 +02:00
Adam Vandenberg
5c3a96ae68 Move testing tarballs into subfolder 2010-07-29 12:03:23 -07:00
Adam Vandenberg
e0d936da5a Fix brew info test 2010-07-29 09:33:32 -07:00
Adam Vandenberg
2e881238de Add name to brew info url and remove external script 2010-07-29 08:40:22 -07:00
Adam Vandenberg
f17a92ff40 Clean up test script & use system ruby to run tests 2010-07-20 21:16:33 -07:00