-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
full test coverage, adding tests, deleting dead code
- Loading branch information
Showing
4 changed files
with
112 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
const t = require('tap') | ||
const mm = t.mock('../', { path: { sep: '\\' }}) | ||
t.test('path separator \\', t => { | ||
const mm = t.mock('../', { path: { sep: '\\' }}) | ||
|
||
t.equal(mm('x\\y\\z', 'x/y/*/z'), false) | ||
t.equal(mm('x\\y\\w\\z', 'x/y/*/z'), true) | ||
t.equal(mm('x\\y\\z', 'x/y/*/z'), false) | ||
t.equal(mm('x\\y\\w\\z', 'x/y/*/z'), true) | ||
t.end() | ||
}) | ||
|
||
// just in case Node every adds Mac OS 9 support 😅 | ||
t.test('path separator :', t => { | ||
const mm = t.mock('../', { path: { sep: ':' }}) | ||
|
||
t.equal(mm('x:y:z', 'x/y/*/z'), false) | ||
t.equal(mm('x:y:w:z', 'x/y/*/z'), true) | ||
t.end() | ||
}) |