Skip to content

Commit

Permalink
test(regular): add failing test for segment matching
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Jun 16, 2022
1 parent 2ff5a2f commit 72a0ec2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
Empty file.
Empty file.
12 changes: 9 additions & 3 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ describe('Package', () => {
'fixtures/first/nested/file.md',
'fixtures/second/file.md',
'fixtures/second/nested/directory/file.md',
'fixtures/second/nested/file.md'
'fixtures/second/nested/file.md',
'fixtures/third/library/a/book.md',
'fixtures/third/library/b/book.md'
];

const actual = fg.sync(['fixtures/**/*.md']);
Expand Down Expand Up @@ -67,7 +69,9 @@ describe('Package', () => {
'fixtures/first/nested/file.md',
'fixtures/second/file.md',
'fixtures/second/nested/directory/file.md',
'fixtures/second/nested/file.md'
'fixtures/second/nested/file.md',
'fixtures/third/library/a/book.md',
'fixtures/third/library/b/book.md'
];

const actual = await fg(['fixtures/**/*.md']);
Expand Down Expand Up @@ -112,7 +116,9 @@ describe('Package', () => {
'fixtures/first/nested/file.md',
'fixtures/second/file.md',
'fixtures/second/nested/directory/file.md',
'fixtures/second/nested/file.md'
'fixtures/second/nested/file.md',
'fixtures/third/library/a/book.md',
'fixtures/third/library/b/book.md'
];

const actual: string[] = [];
Expand Down
13 changes: 13 additions & 0 deletions src/tests/smoke/regular.smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,3 +511,16 @@ smoke.suite('Smoke -> Regular (negative group)', [
cwd: 'fixtures/first'
}
]);

smoke.suite('Smoke -> Regular (segmented lists)', [
{
pattern: '{book.xml,**/library/*/book.md}',
cwd: 'fixtures/third',
broken: true,
issue: 365
},
{
pattern: '{book.xml,library/**/a/book.md}',
cwd: 'fixtures/third'
}
]);

0 comments on commit 72a0ec2

Please sign in to comment.