Skip to content

Commit 79260ad

Browse files
authored
Merge pull request #366 from AgentEnder/test/broken-segments
test(regular): add failing test for segment matching
2 parents 2ff5a2f + 72a0ec2 commit 79260ad

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

fixtures/third/library/a/book.md

Whitespace-only changes.

fixtures/third/library/b/book.md

Whitespace-only changes.

src/index.spec.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ describe('Package', () => {
2222
'fixtures/first/nested/file.md',
2323
'fixtures/second/file.md',
2424
'fixtures/second/nested/directory/file.md',
25-
'fixtures/second/nested/file.md'
25+
'fixtures/second/nested/file.md',
26+
'fixtures/third/library/a/book.md',
27+
'fixtures/third/library/b/book.md'
2628
];
2729

2830
const actual = fg.sync(['fixtures/**/*.md']);
@@ -67,7 +69,9 @@ describe('Package', () => {
6769
'fixtures/first/nested/file.md',
6870
'fixtures/second/file.md',
6971
'fixtures/second/nested/directory/file.md',
70-
'fixtures/second/nested/file.md'
72+
'fixtures/second/nested/file.md',
73+
'fixtures/third/library/a/book.md',
74+
'fixtures/third/library/b/book.md'
7175
];
7276

7377
const actual = await fg(['fixtures/**/*.md']);
@@ -112,7 +116,9 @@ describe('Package', () => {
112116
'fixtures/first/nested/file.md',
113117
'fixtures/second/file.md',
114118
'fixtures/second/nested/directory/file.md',
115-
'fixtures/second/nested/file.md'
119+
'fixtures/second/nested/file.md',
120+
'fixtures/third/library/a/book.md',
121+
'fixtures/third/library/b/book.md'
116122
];
117123

118124
const actual: string[] = [];

src/tests/smoke/regular.smoke.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,3 +511,16 @@ smoke.suite('Smoke -> Regular (negative group)', [
511511
cwd: 'fixtures/first'
512512
}
513513
]);
514+
515+
smoke.suite('Smoke -> Regular (segmented lists)', [
516+
{
517+
pattern: '{book.xml,**/library/*/book.md}',
518+
cwd: 'fixtures/third',
519+
broken: true,
520+
issue: 365
521+
},
522+
{
523+
pattern: '{book.xml,library/**/a/book.md}',
524+
cwd: 'fixtures/third'
525+
}
526+
]);

0 commit comments

Comments
 (0)