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

Unified Diff: test/directory_watcher/shared.dart

Issue 861313006: Treat add events for known files as modifications instead of discarding them on Mac OS. Fixes pub s… (Closed) Base URL: https://github.com/dart-lang/watcher.git@master
Patch Set: Created 5 years, 11 months 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
« lib/src/directory_watcher/mac_os.dart ('K') | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/directory_watcher/shared.dart
diff --git a/test/directory_watcher/shared.dart b/test/directory_watcher/shared.dart
index 86324014bf173392cfd75233c5c93d1fa2567b75..a4cec5e11654aef8553b79ee9f5cfc7e7635a823 100644
--- a/test/directory_watcher/shared.dart
+++ b/test/directory_watcher/shared.dart
@@ -121,6 +121,18 @@ void sharedTests() {
renameFile("dir/old.txt", "new.txt");
expectRemoveEvent("dir/old.txt");
});
+
+ test('notifies when a file is moved onto an existing one', () {
+ writeFile("from.txt");
+ writeFile("to.txt");
+ startWatcher();
+
+ renameFile("from.txt", "to.txt");
+ inAnyOrder([
+ isRemoveEvent("from.txt"),
+ isModifyEvent("to.txt")
+ ]);
+ });
});
// Most of the time, when multiple filesystem actions happen in sequence,
« lib/src/directory_watcher/mac_os.dart ('K') | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698