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:
2026-07-13 18:17:51 +02:00
co-authored by Claude Fable 5
parent 0a44f95dfd
commit 5398ecdc3f
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -35,7 +35,9 @@ void main() {
final target = '${parent.path}/my-app';
expect(r.path, target);
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(inited, [target]);
});
+1 -1
View File
@@ -61,7 +61,7 @@ void main() {
test('built-in set hides clide-owned dirs', () {
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('lib', isDirectory: true), isFalse);