diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-12-01 19:35:43 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-12-01 22:30:21 +0300 |
commit | 49531f69ed251f0caf030e19afbf6a0fd1868aa6 (patch) | |
tree | aae14a5edc1772d30f75aa21de131eb7d7f15ce1 /tests/wildcard/testscript | |
parent | abfee51c362cb1ed2e8eb62fec12b3eb5ca03fb0 (diff) |
Change path_search() to only match directory absent components in 'match absent' mode
Diffstat (limited to 'tests/wildcard/testscript')
-rw-r--r-- | tests/wildcard/testscript | 134 |
1 files changed, 105 insertions, 29 deletions
diff --git a/tests/wildcard/testscript b/tests/wildcard/testscript index 885a7d5..bc90468 100644 --- a/tests/wildcard/testscript +++ b/tests/wildcard/testscript @@ -1154,7 +1154,7 @@ : ignorable-components : { - test.options += -i + test.options += -i -n : middle : @@ -1164,25 +1164,58 @@ $* a/**/b a/b >/ a/b $* a/**/b a/x/b >/ a/x/b - $* a/***/b a/b >>/EOE + $* a/***/b a/b >>/EOO a/b a/b - EOE + EOO + + : multiple + : + { + $* a/**/*/b a/b >/ a/b + + $* a/**/*/b a/x/b >>/EOO + a/x/b + a/x/b + EOO + } } : top-level : if ($cxx.target.class != 'windows') { - $* -n /*/a /a > /a - $* -n /*/a /b/a > /b/a + $* /*/a /a > /a + $* /*/a /b/a > /b/a + + : multiple + : + { + $* /*/*/a /a > /a + + $* /*/*/a /b/a >>EOO + /b/a + /b/a + EOO + } } : leading : { - $* -n */a a >/ a - $* -n */a b/a >/ b/a + $* */a a >/ a + $* */a b/a >/ b/a + + : multiple + : + { + $* */*/a a >/ a + + $* */*/a b/a >>/EOO + b/a + b/a + EOO + } } : trailing @@ -1190,45 +1223,88 @@ { : file : + : Test that the pattern star-only component of the file type does not + : match an absent component. + : { - $* -n a/* a >/ a - $* -n a/* a/b >/ a/b + $* a/* a/b >/ a/b + + $* a/* a == 1 + $* a/* a/ == 1 + $* a/* a/b/ == 1 + + : multiple + : + { + $* a/*/* a/b >/ a/b - $* -n a/* a/ == 1 - $* -n a/* a/b/ == 1 + $* a/*/* a == 1 + $* a/*/* a/ == 1 + $* a/*/* a/b/ == 1 + } } : dir : { - $* -n a/*/ a/ >/ a/ - $* -n a/*/ a/b >/ a/ + $* a/*/ a/ >/ a/ + $* a/*/ a/b >/ a/ - $* -n a/*/ a/b/ >>/EOE + $* a/*/ a/b/ >>/EOO a/b/ a/ - EOE + EOO + + $* a/*/ a == 1 - $* -n a/*/ a == 1 + : multiple + : + { + $* a/*/*/ a/ >/ a/ + $* a/*/*/ a/b >/ a/ + + $* a/*/*/ a/b/ >>/EOO + a/b/ + a/b/ + a/ + EOO + + $* a/*/*/ a == 1 + } } } : leading-trailing { - $* -n */* a >/ a - $* -n */* a/b >/ a/b - - $* -n */a/* a >/ a - $* -n */a/* a/b >/ a/b - $* -n */a/* b/a >/ b/a - $* -n */a/* c/a/b >/ c/a/b - - $* -n **/a/** a >/ a - $* -n **/a/** a/b/c/d >/ a/b/c/d - $* -n **/a/** d/c/b/a >/ d/c/b/a - $* -n **/a/** d/c/b/a/b/c/d >/ d/c/b/a/b/c/d - } + : adjacent + : + { + $* */* a >/ a + $* */* a/b >/ a/b + + $* */* a/ == 1 + } + : apart + : + { + $* */a/* a/b >/ a/b + $* */a/* c/a/b >/ c/a/b + $* */a/* a == 1 + $* */a/* b/a == 1 + $* */a/* b/a/ == 1 + + : recursive + : + { + $* **/a/** a/b/c/d >/ a/b/c/d + $* **/a/** d/c/b/a/b/c/d >/ d/c/b/a/b/c/d + + $* **/a/** a == 1 + $* **/a/** d/c/b/a == 1 + } + } + } } } |