Skip to content

Commit 908aa69

Browse files
committed
more tests
1 parent 85fb8b9 commit 908aa69

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/parallel/test-path-escapeglob.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ const samples = [
1313
['file[0-9]?.txt', 'file[[]0-9[]][?].txt'],
1414
['C:\\Users\\*.txt', 'C:\\Users\\[*].txt'],
1515
['?[]', '[?][[][]]'],
16+
['[', '[[]'],
17+
['[]', '[[][]]'],
18+
['[', '[[]'],
19+
['[*', '[[][*]'],
20+
['[]a', '[[][]]a'],
1621
];
1722

1823
for (const [pattern, expected] of samples) {

test/parallel/test-path-unescapeglob.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ const samples = [
1313
['file[0-9]?.txt', 'file[[]0-9[]][?].txt'],
1414
['C:\\Users\\*.txt', 'C:\\Users\\[*].txt'],
1515
['?[]', '[?][[][]]'],
16+
['[', '[[]'],
17+
['[]', '[[][]]'],
18+
['[', '[[]'],
19+
['[*', '[[][*]'],
20+
['[]a', '[[][]]a'],
1621
];
1722

1823
for (const [expected, escapedPattern] of samples) {

0 commit comments

Comments
 (0)