File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ describe('pattern', () => {
303303 expect ( pattern . match ( `${ root } foo/bar/baz` ) ) . toBeFalsy ( )
304304 pattern = new Pattern ( `${ root } foo/b[!]r/b*` )
305305 expect ( pattern . searchPath ) . toBe ( `${ root } foo${ path . sep } b!r` )
306- expect ( pattern . match ( `${ root } foo/b!r/baz` ) ) . toBeTruthy ( )
306+ expect ( pattern . match ( `${ root } foo/b!r/baz` ) ) . toBeFalsy ( )
307307 pattern = new Pattern ( `${ root } foo/b[[]ar/b*` )
308308 expect ( pattern . searchPath ) . toBe ( `${ root } foo${ path . sep } b[ar` )
309309 expect ( pattern . match ( `${ root } foo/b[ar/baz` ) ) . toBeTruthy ( )
@@ -340,9 +340,11 @@ describe('pattern', () => {
340340 pattern = new Pattern ( 'C:/foo/b\\[a]r/b*' )
341341 expect ( pattern . searchPath ) . toBe ( `C:\\foo\\b\\ar` )
342342 expect ( pattern . match ( 'C:/foo/b/ar/baz' ) ) . toBeTruthy ( )
343+
344+ // Regression testing for minimatch v3
343345 pattern = new Pattern ( 'C:/foo/b[\\!]r/b*' )
344346 expect ( pattern . searchPath ) . toBe ( 'C:\\foo\\b[\\!]r' )
345- expect ( pattern . match ( 'C:/foo/b[undefined/!]r/baz' ) ) . toBeTruthy ( ) // Note, "undefined" substr to accommodate a bug in Minimatch when nocase=true
347+ expect ( pattern . match ( 'C:/foo/b[undefined/!]r/baz' ) ) . toBeFalsy ( )
346348 }
347349 } )
348350} )
You can’t perform that action at this time.
0 commit comments