test sweep: foundational systems — files / ipc errno / panes (T-91)
test / unit + widget + golden + a11y (push) Failing after 32s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
test / unit + widget + golden + a11y (push) Failing after 32s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
Three small foundational test additions: - test/files/watcher_test.dart (new, 8 tests): FileChangeKind fromEvent across every FileSystemEvent.type + wire getter, FileChange.toJson, FileWatcher end-to-end (created event, ignored-path filtering, idempotent start, stop teardown). - ignore_test: trailing /**, bare **, ? glob-pattern branches in the regex compiler. - path_safety_test: PathOutsideRoot.toString embeds the three fields. - ipc/errno_mapping_test: ENOTDIR / ENOMEM / EAGAIN branches in errnoToIpcError that weren't previously hit. - panes/registry_test: RecordingEventSink.ofSubsystem filter. Coverage: src/files/watcher.dart 10/36 -> ~ all; ignore.dart + path_safety.dart residuals closed; ipc/errno_mapping.dart 3 added branches; panes/event_sink.dart 100%. Total coverage 90.53% -> 90.99%. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -76,5 +76,23 @@ void main() {
|
||||
expect(s.isIgnored('docs/a.draft.md', isDirectory: false), isTrue);
|
||||
expect(s.isIgnored('other/a.draft.md', isDirectory: false), isFalse);
|
||||
});
|
||||
|
||||
test('trailing /** matches every descendant', () {
|
||||
final s = IgnoreSet.parse(['build/**']);
|
||||
expect(s.isIgnored('build/a/b/c.txt', isDirectory: false), isTrue);
|
||||
expect(s.isIgnored('src/a.txt', isDirectory: false), isFalse);
|
||||
});
|
||||
|
||||
test('bare ** (not adjacent to /) matches across path separators', () {
|
||||
final s = IgnoreSet.parse(['a**z']);
|
||||
expect(s.isIgnored('axyz', isDirectory: false), isTrue);
|
||||
expect(s.isIgnored('amiddlez', isDirectory: false), isTrue);
|
||||
});
|
||||
|
||||
test('? matches exactly one non-slash character', () {
|
||||
final s = IgnoreSet.parse(['a?c']);
|
||||
expect(s.isIgnored('abc', isDirectory: false), isTrue);
|
||||
expect(s.isIgnored('a/c', isDirectory: false), isFalse);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user