From 5398ecdc3f5abe7e4b91396b2ac268b18862bd8f Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Mon, 13 Jul 2026 18:17:51 +0200 Subject: [PATCH] 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 --- test/daemon/project_commands_test.dart | 4 +++- test/files/ignore_test.dart | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/daemon/project_commands_test.dart b/test/daemon/project_commands_test.dart index 2a354dd7..50320c6a 100644 --- a/test/daemon/project_commands_test.dart +++ b/test/daemon/project_commands_test.dart @@ -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]); }); diff --git a/test/files/ignore_test.dart b/test/files/ignore_test.dart index 5f99a204..2fd4f772 100644 --- a/test/files/ignore_test.dart +++ b/test/files/ignore_test.dart @@ -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);