aboutsummaryrefslogtreecommitdiff
path: root/tests/name/pattern.test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-13 13:37:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-13 13:37:10 +0200
commit8b7ead9400820969a6133a5c5827b4690099b4d5 (patch)
tree9d31dc059f31c240889bc99bf1502f6ebcf55d73 /tests/name/pattern.test
parent482d362979baf8b0fef7f46b0cd61a29faeb11a8 (diff)
Filter hidden files/directories in wildcard patterns matches
Diffstat (limited to 'tests/name/pattern.test')
-rw-r--r--tests/name/pattern.test24
1 files changed, 24 insertions, 0 deletions
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.