28 Commits

Author SHA1 Message Date
Jack Nagel
21dfef7ec2 Fix broken brew cleanup tests 2012-12-01 14:42:30 -06:00
Jack Nagel
7e6c274f81 test_bucket: don't try to clean a non-existent keg
It is a no-op under Ruby 1.8 but Pathname#find raises ENOENT if the
directory doesn't exist under 1.9. But we really shouldn't try to clean
a non-existent keg anyway, and FormulaInstaller will have bailed out
long before the clean step if the keg doesn't exist, so lets just not
even test this condition; the cleaner has its own tests anyway.

Alternatively we can adjust the cleaner to handle this case, but I don't
see much value in that.

n.b. with this, the tests now pass under 1.9.3 (for me), which is nice
because I often run them on that version inadvertently.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:50:13 -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
93f8c71e21 tests: clean up whitespace
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
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
84a4935bb5 tests: setup and teardown cleanups
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:08:32 -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
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
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
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
Max Howell
c1a3b724fd Some Cleanup 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
Adam Vandenberg
e0d936da5a Fix brew info test 2010-07-29 09:33:32 -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
Adam Vandenberg
e4766639dc Move Pathename property tests to separate file. 2010-04-06 08:27:11 -07:00
Adam Vandenberg
a7d74df430 Move ARGV tests to separate file. 2010-04-06 08:27:11 -07:00
Adam Vandenberg
551d42c6a9 Move utils tests to separate file. 2010-04-06 08:27:11 -07:00
Adam Vandenberg
5a6d6fd168 Tests for Pathname.install. 2010-04-06 08:27:11 -07:00
Adam Vandenberg
62de8aa663 Merge Formula class name tests 2010-04-06 08:27:11 -07:00
Adam Vandenberg
4c2a8a7f1c Move version tests to separate file. 2010-04-06 08:27:11 -07:00
Adam Vandenberg
a5cbf94596 Move hardware detection tests to separate file. 2010-04-06 08:27:10 -07:00
Adam Vandenberg
3123720608 Move install tests to separate file. 2010-04-06 08:27:10 -07:00
Adam Vandenberg
1d46991637 Remove silly concatenation. 2010-04-06 08:27:10 -07:00
Adam Vandenberg
a309403d8a Update test suite.
* Break single test case class into several test cases.
* Fix broken arch test.
* Make update tests optional (seem to only work for mxcl).
* Add more tests.
* Move fixtures to separate folder.
2010-02-02 09:08:10 -08:00