2238 Commits

Author SHA1 Message Date
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
Adam Vandenberg
14f0556d1c Remove "test/formula_test.rb"
This diagnostic script has been replaced by the "brew audit" external command.
2010-07-19 20:15:04 -07:00
Adam Vandenberg
696e49e87a Move exceptions from global to utils; remove duplicate defintions 2010-07-08 22:41:51 -07:00
Adam Vandenberg
375f8094d3 Add debian style names to version checker. 2010-07-06 13:17:50 -07:00
Adam Vandenberg
4ae8029557 Update version tests 2010-07-06 13:17:43 -07:00
Adam Vandenberg
eb058c0958 Fix: attr doesn't take a list. 2010-06-10 19:39:15 -07:00
Adam Vandenberg
1761ba66bf Failures during ./configure should mention config.log. 2010-06-10 12:57:51 -07:00
David Porter
4da905b7fb Fix the update tests
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-05-12 09:20:15 -07:00
Adam Vandenberg
cfc8fca74d Support jruby external dependencies.
* Add tests that run only if 'jruby' is installed.
* Note that if your formula has :jruby deps, it should likely
  "depend_on 'jruby'" as well.
2010-04-09 11:21:35 -07:00
Adam Vandenberg
cacb057b91 Move ENV tests to separate file. 2010-04-06 08:27:12 -07:00
Adam Vandenberg
31ebf6a293 Split out some Formula tests. 2010-04-06 08:27:12 -07:00
Adam Vandenberg
5cbab370e4 Switch test_bucket over to use testing_env. 2010-04-06 08:27:12 -07:00