stow/t
Adam Spiers 8436768144 Eliminate erroneous warning when unstowing (#65)
When unstowing a package, cleanup_invalid_links() is invoked to remove
any invalid links owned by Stow.  It was invoking link_owned_by_package()
to check whether each existing link is owned by Stow.  This in turn
called find_stowed_path() which since 40a0807185 was not allowing for
the possibility that it could be passed a symlink *not* owned by Stow
with an absolute target and consequently emitting an erroneous warning.

So remove this erroneous warning, and refactor find_stowed_path()
to use two new helper functions for detecting stow directories:
link_dest_within_stow_dir() and find_containing_marked_stow_dir().
Also refactor the logic within each to be simpler and more accurate,
and add more test cases to the corresponding parts of the test suite.

Fixes #65.
Closes #103.

https://github.com/aspiers/stow/issues/65
2024-03-31 14:03:47 +01:00
..
chkstow.t Replace testutil::make_dir with File::Path::make_path 2019-06-28 01:02:48 +01:00
cleanup_invalid_links.t cleanup_invalid_links: add test for non-cleanup of an unowned link 2024-03-31 12:24:02 +01:00
cli.t cli.t: test with the right Perl executable 2019-07-15 16:12:26 -04:00
cli_options.t Replace testutil::make_dir with File::Path::make_path 2019-06-28 01:02:48 +01:00
defer.t Rename $OUT_DIR to $TEST_DIR 2019-06-28 00:53:12 +01:00
dotfiles.t dotfiles.t: improve comment descriptions 2024-03-09 17:57:04 +00:00
examples.t Replace testutil::make_dir with File::Path::make_path 2019-06-28 01:02:48 +01:00
find_stowed_path.t Eliminate erroneous warning when unstowing (#65) 2024-03-31 14:03:47 +01:00
foldable.t Replace testutil::make_dir with File::Path::make_path 2019-06-28 01:02:48 +01:00
ignore.t Replace testutil::make_dir with File::Path::make_path 2019-06-28 01:02:48 +01:00
join_paths.t Make join_paths correctly handle absolute paths 2024-03-31 12:02:58 +01:00
link_dest_within_stow_dir.t Eliminate erroneous warning when unstowing (#65) 2024-03-31 14:03:47 +01:00
parent.t Change #!/usr/local/bin/perl to #!/usr/bin/perl in t/*.t 2019-06-27 20:37:50 +01:00
rc_options.t Remove dependencies on Hash::Merge and Clone::Choose 2019-06-29 13:42:19 +01:00
stow.t Add examples of how to enable debugging in tests 2019-06-28 15:24:50 +01:00
testutil.pm Move setting of cperl-indent-level to .dir-locals.el 2024-03-31 12:02:58 +01:00
unstow.t Separate treatment of .stow and .nonstow marked dirs 2024-03-31 12:15:53 +01:00
unstow_orig.t Separate treatment of .stow and .nonstow marked dirs 2024-03-31 12:15:53 +01:00