diff options
author | Mike Burns and Eric Collins <mburns@thoughtbot.com> | 2015-11-27 13:07:17 +0100 |
---|---|---|
committer | Mike Burns and Eric Collins <mike@mike-burns.com> | 2016-12-26 16:24:19 -0500 |
commit | 0651e4f5e0e71b57d6564f2f2887ab98f13f1995 (patch) | |
tree | a2972cd67447f615fa6c83f9bdf6ff1e26b1f3ca /test/lsrc-excludes.t | |
parent | bc0d5b63f6c4762b7d39fb32b525f977015ff4b3 (diff) |
Fix relative exclude globs
Pass the dotfiles subdir along with the file to `is_excluded` so that we
can match against it.
Preserve single-file compatibility by looping twice.
Diffstat (limited to 'test/lsrc-excludes.t')
-rw-r--r-- | test/lsrc-excludes.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lsrc-excludes.t b/test/lsrc-excludes.t index de63840..aa483f1 100644 --- a/test/lsrc-excludes.t +++ b/test/lsrc-excludes.t @@ -18,3 +18,18 @@ Should accept directory:file syntax /*/.example:/*/.dotfiles/example (glob) /*/.excluded:/*/.dotfiles/excluded (glob) /*/.included:/*/.other-dotfiles/included (glob) + +Should handle excludes with globs + + $ mkdir -p fresh/hola/chao + > touch fresh/hola/chao/wo + > touch fresh/hola/chao/nemo + > touch fresh/hola/tossala + > touch fresh/hola/s + > touch fresh/s + + $ lsrc -d fresh -x 'hola/chao/*' -x s + /*/.hola/tossala:/*/fresh/hola/tossala (glob) + + $ lsrc -d fresh -x 'hola/chao' -x s + /*/.hola/tossala:/*/fresh/hola/tossala (glob) |