Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: pkg/watcher/test/directory_watcher/shared.dart

Issue 66163002: Wrap Directory.watch on Mac OS for the watcher package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/watcher/test/directory_watcher/shared.dart
diff --git a/pkg/watcher/test/directory_watcher/shared.dart b/pkg/watcher/test/directory_watcher/shared.dart
index eed606931c5804b7f5ffa0a705ee998c30dcef5a..34b5e6284d3b872a32ef519b46b7b0c82a80fd4d 100644
--- a/pkg/watcher/test/directory_watcher/shared.dart
+++ b/pkg/watcher/test/directory_watcher/shared.dart
@@ -6,6 +6,8 @@ import 'package:scheduled_test/scheduled_test.dart';
import '../utils.dart';
+import 'dart:async';
+
sharedTests() {
test('does not notify for files that already exist when started', () {
// Make some pre-existing files.
@@ -218,5 +220,21 @@ sharedTests() {
});
});
});
+
+ test("emits events for many files added at once in a subdirectory with the "
+ "same name as a removed file", () {
+ writeFile("dir/sub");
+ withPermutations((i, j, k) =>
+ writeFile("old/sub-$i/sub-$j/file-$k.txt"));
+ startWatcher(dir: "dir");
+
+ deleteFile("dir/sub");
+ renameDir("old", "dir/sub");
+ inAnyOrder(() {
+ expectRemoveEvent("dir/sub");
+ withPermutations((i, j, k) =>
+ expectAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt"));
+ });
+ });
});
}
« no previous file with comments | « pkg/watcher/test/directory_watcher/mac_os_test.dart ('k') | pkg/watcher/test/no_subscription/mac_os_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698