41 Commits

Author SHA1 Message Date
Andrea Kao
8ec59253df tests: fix code style issues (#587) 2016-08-06 07:04:59 +02:00
Mike McQuaid
51dd73dba8 test_keg: port to generic layer. 2016-07-27 15:05:42 -06:00
William Woodruff
cb3ad215b4 test: Add tests for Keg#mach_o_files link behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new tests.

Closes #400.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-29 14:34:08 +02:00
Tim D. Smith
70ceb851a5 Revert "test: Add test for Keg#mach_o_files hardlink behavior."
This reverts commit 62d7079684cdb568600e22531c62888622a71ff1.
2016-06-27 23:25:10 -07:00
William Woodruff
62d7079684 test: Add test for Keg#mach_o_files hardlink behavior.
Move dylib_path and bundle_path from test_mach to testing_env to
accommodate the new test.

Closes #400.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2016-06-27 22:56:28 -07:00
Paolo G. Giarrusso
2f20a42292 Synchronize counts for link and unlink (#242)
Closes #239.
2016-05-15 12:07:58 +01:00
Xu Cheng
f6355c9dfc test_keg: add test_empty_installation 2016-01-09 21:09:02 +08:00
Vlad Shablinsky
dc4feaf56b test_keg: add tests for oldname optlink
Closes Homebrew/homebrew#42998.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-17 01:53:58 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Ben Morgan
1795599d88 keg: explicitly create cmake dir under lib
Packages supporting CMake may install configuration files for use
with CMake's find_package command. A recommended location for these
is `<prefix>/lib/cmake` which is not unique across packages. This
may cause issues for Formula using this location when their Keg
is linked.

As with pkg-config, explicitly create the `lib/cmake` folder when
linking a Keg that has installed folders/files to this location.

Also add testcase.

Closes Homebrew/homebrew#38005.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-29 22:01:21 +08:00
Jack Nagel
55e0f40d02 Handle broken symlinks in resolve_any_conflicts
Fixes Homebrew/homebrew#33328.
2014-10-20 17:07:54 -05:00
Jack Nagel
975f61d981 Fix filesystem leak in keg tests 2014-10-20 17:07:53 -05:00
Jack Nagel
1eafe3bc35 Handle conflicts where links point at symlinks
Fixes Homebrew/homebrew#30664.
2014-07-12 19:56:58 -05:00
Jack Nagel
7b26c885bd Always link symlinks directly 2014-07-12 19:56:58 -05:00
Jack Nagel
f666b76c39 Add more tests documenting linking behavior 2014-07-03 23:27:54 -05:00
Jack Nagel
60fc7eb0ed Avoid chdir just to make a symlink 2014-07-03 23:27:54 -05:00
Jack Nagel
083448d55d Move repeated pathname into setup 2014-07-03 23:27:54 -05:00
Jack Nagel
9e19db0dd6 Don't assign @keg twice in setup 2014-07-03 23:27:53 -05:00
Jack Nagel
4acf25a2b9 No need to silence output from Keg#link anymore 2014-07-03 23:27:53 -05:00
Jack Nagel
a6c514024b Flesh out linking tests 2014-07-01 09:01:06 -05:00
Jack Nagel
c0baad7e68 Add tests around opt links 2014-06-30 22:14:06 -05:00
Jack Nagel
de24d73172 Use Keg#uninstall to uninstall kegs 2014-06-23 22:34:41 -05:00
Jack Nagel
58a75b0f71 Use assert_predicate 2014-06-18 20:34:09 -05:00
Jack Nagel
06305e6211 Switch to Minitest 2014-06-18 20:34:09 -05:00
Jack Nagel
982e9239b8 Use a custom test class so we can avoid monkeypatching 2014-06-18 20:32:51 -05:00
Jack Nagel
6b5e92ac47 Raise AlreadyLinkedError when a keg is already linked 2014-04-21 12:43:06 -05:00
Jack Nagel
727f204760 Raise useful errors from make_relative_symlink 2014-04-21 12:43:06 -05:00
Jack Nagel
a0851c1380 Assert that Keg#link produces relative symlinks 2014-03-27 09:59:54 -05:00
Jack Nagel
3e9a88c365 Assert that the broken symlink is actually overwritten 2014-03-27 09:59:54 -05:00
Jack Nagel
e9ee640024 Don't let broken symlinks halt linking 2014-03-27 09:35:10 -05:00
Jack Nagel
d5325eb4e4 Always prune empty toplevel directories when unlinking
Closes Homebrew/homebrew#21750.
2013-08-09 20:55:54 -05:00
Jack Nagel
e4b951520a Keep track of pruned parent directories 2013-08-09 20:50:43 -05:00
Jack Nagel
1d8a85c0ae Add tests to demonstrate failure to prune empty directories 2013-08-09 20:50:43 -05:00
Jack Nagel
bca37554b7 Remove hardcoded paths in keg tests 2013-08-09 20:50:42 -05:00
Jack Nagel
1074221a22 Remove keg test dependency on formula 2013-08-09 20:50:42 -05:00
Jack Nagel
e0c4fd5b72 test_keg: reduce noise by including FileUtils 2013-05-14 16:29:36 -05:00
Jack Nagel
cf2b0f88e6 test_keg: make mode an ivar 2013-05-14 16:29:36 -05:00
Desmond Brand
ba93e6d363 Overwrite broken symlinks with --overwrite
Closes Homebrew/homebrew#19480.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-05-09 09:21:34 -05:00
Jack Nagel
cfe922ffd4 Silence stderr in test suite 2013-04-01 12:15:29 -05:00
Misty De Meo
18f5bf1092 Fix Keg tests
* unreverse expected/actuals
* don't assume linked file order is guaranteed - it wasn't!
2012-10-23 17:10:12 -05:00
Misty De Meo
447f78c0d2 brew ln --force is now brew ln --overwrite
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349
* Changes --dry-run to preview linking by default, rather than
  overwriting. An overwrite dry-run can be simulated via both
  --dry-run --overwrite
* Adds some basic Keg tests
2012-10-20 21:00:46 -05:00