From 8b7ead9400820969a6133a5c5827b4690099b4d5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Mar 2017 13:37:10 +0200 Subject: Filter hidden files/directories in wildcard patterns matches --- tests/name/pattern.test | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/name') diff --git a/tests/name/pattern.test b/tests/name/pattern.test index e9e1c45..ae0cc3a 100644 --- a/tests/name/pattern.test +++ b/tests/name/pattern.test @@ -133,6 +133,30 @@ EOI $* <'print dir{*/ -bar/}' >/'dir{foo/}' } +: dot +: +: Test filtering of hidden files/directories. +{ + touch foo.txt .foo.txt; + $* <'print *.txt' >'foo.txt' : file-excl + + touch foo.txt .foo.txt; + $* <'print .*.txt' >'.foo.txt' : file-incl + + mkdir dir .dir; + $* <'print */' >/'dir/' : dir-excl + + mkdir dir .dir; + $* <'print .*/' >/'.dir/' : dir-incl + + mkdir dir .dir && touch dir/foo.txt .dir/foo.txt; + $* <'print */*.txt' >/'dir/foo.txt'; + $* <'print **.txt' >/'dir/foo.txt' : dir-interm-excl + + mkdir dir .dir && touch dir/foo.txt .dir/foo.txt; + $* <'print .*/*.txt' >/'.dir/foo.txt' : dir-interm-incl +} + : expansion : : Test interaction with expansion/concatenation/re-parse. -- cgit v1.1