diff --git a/package-lock.json b/package-lock.json index f9c96ff..825656c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@gerhobbelt/gitignore-parser", - "version": "0.0.3-1", + "version": "0.0.3-2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 98de7c1..3a808b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gerhobbelt/gitignore-parser", - "version": "0.0.3-1", + "version": "0.0.3-2", "description": "A simple .gitignore parser.", "keywords": [ "gitignore", @@ -23,7 +23,7 @@ "build": "npm test", "test": "mocha", "watch": "mocha --watch", - "pub": "npm publish --public" + "pub": "npm publish --access public" }, "author": { "name": "Charles Pick", diff --git a/test/index.js b/test/index.js index ae79020..11c09f7 100644 --- a/test/index.js +++ b/test/index.js @@ -118,4 +118,26 @@ describe('gitignore parser', function() { assert.strictEqual(gitignore.accepts('a/3/a'), false); }); }) + + describe('issue #12', function () { + it('should not fail test A', function () { + var gitignore = parser.compile('/ajax/libs/bPopup/*b*'); + assert.strictEqual(gitignore.accepts('/ajax/libs/bPopup/0.9.0'), true); //output false + }); + + it('should not fail test B', function () { + var gitignore = parser.compile('/ajax/libs/jquery-form-validator/2.2'); +assert.strictEqual(gitignore.accepts('/ajax/libs/jquery-form-validator/2.2.43'), true); //output false + }); + + it('should not fail test C', function () { + var gitignore = parser.compile('/ajax/libs/punycode/2.0'); +assert.strictEqual(gitignore.accepts('/ajax/libs/punycode/2.0.0'), true); //output false + }); + + it('should not fail test D', function () { + var gitignore = parser.compile('/ajax/libs/typescript/*dev*'); +assert.strictEqual(gitignore.accepts('/ajax/libs/typescript/2.0.6-insiders.20161014'), true); //output false + }); + }); });