Commit graph

14 commits

Author SHA1 Message Date
Adam Spiers 6d6781dcef t/unstow_orig.t: use like() for regexp matching tests
This is better because it outputs the mismatching value when
the matching check fails.
2024-04-06 11:59:10 +01:00
Adam Spiers 599944bce1 t/unstow_orig.t: use is() for equality tests
This is better because it outputs the mismatching values when
the equality check fails.
2024-04-06 11:51:37 +01:00
Adam Spiers bca711fac2 tests: use stderr_like() instead of home-grown STDERR capturing
The STDERR capturing in testutil just reinvents Test::Output which
we already use in chkstow.t, so it's pointless to reinvent that wheel.
2024-04-06 11:33:18 +01:00
Adam Spiers 2c255af187 t/unstow_orig: split into subtests 2024-04-01 22:39:32 +01:00
Adam Spiers a2beb7b371 Separate treatment of .stow and .nonstow marked dirs
Placing a .stow file in a directory tells Stow that this directory
should be considered a Stow directory.  This is already
well-documented.

There was an undocumented and slightly broken feature where placing a
.nonstow file in a directory was treated in exactly the same way.  The
intention was for .nonstow to cause Stow to skip stowing into and
unstowing from that directory and any of its descendants.  However, it
also caused Stow to consider symlinks into any of those directories as
owned by Stow, even though that was clearly not the intention.  So
separate treatment of .stow and .nonstow markers, so that while both
provide protection against Stow stowing and unstowing, only .stow
affects the symlink ownership logic in find_stowed_path() and
marked_stow_dir().

Probably no one uses the undocumented .nonstow feature, so it may make
sense to remove this in future.
2024-03-31 12:15:53 +01:00
Adam Spiers cb4b0c6a9a Remove trailing whitespace 2024-03-09 17:56:41 +00:00
Adam Spiers 6233298a91 Replace testutil::make_dir with File::Path::make_path
No need for a custom function here.
2019-06-28 01:02:48 +01:00
Adam Spiers ba48fd3908 Rename $OUT_DIR to $TEST_DIR
This is a more accurate reflection of what it is.
2019-06-28 00:53:12 +01:00
Adam Spiers 0979a9c7bd Change #!/usr/local/bin/perl to #!/usr/bin/perl in t/*.t
This doesn't really matter, since these are not executed directly, but
it's more consistent with everything else and modern systems.
2019-06-27 20:37:50 +01:00
Adam Spiers 27796720d5 Upgrade to GPL v3 and add headers to files (#44)
Following advice from maintainers@gnu.org, bring Stow in line with
other GNU projects by upgrading it from GPL v2 to v3

  https://www.gnu.org/prep/maintain/html_node/Licensing-of-GNU-Packages.html#Licensing-of-GNU-Packages

as obtained in plain text and texinfo formats from

  https://www.gnu.org/licenses/

and adding appropriate headers:

  https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Code.html#License-Notices-for-Code

Fixes #44: https://github.com/aspiers/stow/issues/44
2019-06-27 20:37:40 +01:00
Adam Spiers 07a84541f1 make it more obvious when target (sub)directory is skipped
This should avoid the sort of confusion seen in:

  https://github.com/aspiers/shell-env/issues/1
2014-09-23 01:37:54 +01:00
Adam Spiers 91c816e32d Use make_invalid_link() to reliably setup symlink fixtures. 2012-02-18 20:33:34 +00:00
Adam Spiers 8357dca645 Remove "There are no outstanding operations to perform" warning.
This is more in keeping with the UNIX convention of no output on success,
and is also the way Stow v1.x behaved.  Thanks to Adam Sampson for the suggestion.
2012-01-11 14:01:40 +00:00
Adam Spiers 0c6d5639e3 Rename test files to reflect their purpose. 2012-01-09 22:12:49 +00:00
Renamed from t/unstow_contents_orig.t (Browse further)