test(files): lock .worktrees/ into the ignore roster + init scaffold
The 23dd7fd1 behavior shipped without a test delta; the builtin-roster
lock test and the scaffold assertion now cover it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,9 @@ void main() {
|
|||||||
final target = '${parent.path}/my-app';
|
final target = '${parent.path}/my-app';
|
||||||
expect(r.path, target);
|
expect(r.path, target);
|
||||||
expect(Directory(target).existsSync(), isTrue);
|
expect(Directory(target).existsSync(), isTrue);
|
||||||
expect(File('$target/.gitignore').existsSync(), isTrue);
|
final ignored = File('$target/.gitignore').readAsStringSync();
|
||||||
|
expect(ignored, contains('.clide/'));
|
||||||
|
expect(ignored, contains('.worktrees/'), reason: 'in-repo worktree checkouts stay out of git (D-106)');
|
||||||
expect(File('$target/CLAUDE.md').readAsStringSync(), contains('my-app'));
|
expect(File('$target/CLAUDE.md').readAsStringSync(), contains('my-app'));
|
||||||
expect(inited, [target]);
|
expect(inited, [target]);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void main() {
|
|||||||
|
|
||||||
test('built-in set hides clide-owned dirs', () {
|
test('built-in set hides clide-owned dirs', () {
|
||||||
final s = IgnoreSet.builtin();
|
final s = IgnoreSet.builtin();
|
||||||
for (final d in const ['.git', '.pql', '.clide', '.dart_tool', 'build', 'node_modules']) {
|
for (final d in const ['.git', '.pql', '.clide', '.dart_tool', '.worktrees', 'build', 'node_modules']) {
|
||||||
expect(s.isIgnored(d, isDirectory: true), isTrue, reason: d);
|
expect(s.isIgnored(d, isDirectory: true), isTrue, reason: d);
|
||||||
}
|
}
|
||||||
expect(s.isIgnored('lib', isDirectory: true), isFalse);
|
expect(s.isIgnored('lib', isDirectory: true), isFalse);
|
||||||
|
|||||||
Reference in New Issue
Block a user