matcher-collection
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -24,3 +24,3 @@ 'use strict'; | ||
MatcherCollection.prototype.mayContain = function(value) { | ||
var parts = value.split('/').filter(Boolean); | ||
var parts = value.split(/\/|\\/g).filter(Boolean); | ||
@@ -27,0 +27,0 @@ for (var i = 0; i < this.matchers.length; i++) { |
{ | ||
"name": "matcher-collection", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
30
test.js
@@ -45,1 +45,31 @@ var fs = require('fs'); | ||
}); | ||
// this can be consolidated if AppVeyor is added | ||
test('MatcherCollection#mayContain Windows', function(t) { | ||
t.mayContain('dir\\bar.txt', ['dir/bar.txt']); | ||
t.mayNotContain('dir\\bar.foo', ['dir/bar.txt']); | ||
t.mayContain('dir\\bar.foo', ['dir/bar.{txt,foo}']); | ||
t.mayContain('dir\\bar.txt', ['dir/bar.{txt,foo}']); | ||
t.mayContain('dir\\', ['dir/bar.txt']); | ||
t.mayContain('dir\\', ['dir/bar.{txt,foo}']); | ||
t.mayContain('dir\\', ['dir/bar.{foo,txt}']); | ||
t.mayContain('dir\\', ['{dir,bar}']); | ||
t.mayContain('dir\\', ['{bar,dir}/foo']); | ||
t.mayNotContain('dir\\', ['{bar}']); | ||
t.mayNotContain('bar', ['baz']); | ||
t.mayNotContain('dir\\subdir', ['dir/bar.txt']); | ||
t.mayNotContain('dir\\zzz.txt', ['dir/bar.txt']); | ||
t.mayNotContain('foo.txt', ['dir/bar.txt']); | ||
t.mayNotContain('some-other-dir', ['dir/bar.txt']); | ||
t.mayNotContain('symlink1', ['dir/bar.txt']); | ||
t.mayNotContain('symlink2', ['dir/bar.txt']); | ||
t.mayNotContain('foo.txt', ['dir/bar.txt']); | ||
t.mayContain('foo\\baz', ['foo/baz/bar/{buz,quz}']); | ||
t.mayContain('foo\\baz', ['foo/{bar,baz}/bar/{buz,quz}']); | ||
t.mayNotContain('foo\\baz\\quz', ['foo/{bar,baz}/bar/{buz,quz}']); | ||
t.mayContain('foo\\baz', ['foo/{bar,baz}/bar/{buz,quz}']); | ||
t.mayContain('foo\\bar', [new Minimatch('foo/bar')]); | ||
t.end(); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4925
4
94