File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ public Regex Glob2Regex(string inp)
105105 sb . Append ( "\\ \\ " ) ;
106106 break ;
107107 case '*' :
108+ uses_metacharacters = true ;
108109 if ( is_char_class )
109110 {
110111 sb . Append ( "\\ *" ) ; // "[*]" matches literal * character
@@ -114,7 +115,6 @@ public Regex Glob2Regex(string inp)
114115 break ; // since globs are only anchored at the end,
115116 // leading * in globs should not influence the matching behavior.
116117 // For example, the globs "*foo.txt" and "foo.txt" should match the same things.
117- uses_metacharacters = true ;
118118 next_c = Peek ( inp ) ;
119119 if ( next_c == '*' )
120120 {
Original file line number Diff line number Diff line change @@ -160,6 +160,13 @@ public static void Test()
160160 ( "aд.txt" , false ) ,
161161 ( "д.md" , false ) ,
162162 } ) ,
163+ ( "**.txt | *.json" , new [ ]
164+ {
165+ ( "Z:\\ foo.json" , true ) ,
166+ ( "c:\\ goon\\ guk.txt" , true ) ,
167+ ( "foo.jsonl" , false ) ,
168+ ( "c:\\ bar.txto" , false ) ,
169+ } ) ,
163170 } ;
164171 var glob = new Glob ( ) ;
165172 foreach ( ( string query , var examples ) in testcases )
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ Test results for NavigateTo v2.6
33Testing Glob syntax
44=========================
55
6- Ran 90 tests and failed 0
6+ Ran 94 tests and failed 0
You can’t perform that action at this time.
0 commit comments