From 0651e4f5e0e71b57d6564f2f2887ab98f13f1995 Mon Sep 17 00:00:00 2001 From: Mike Burns and Eric Collins Date: Fri, 27 Nov 2015 13:07:17 +0100 Subject: 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. --- test/lsrc-excludes.t | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') 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) -- cgit v1.2.3