Index: tests/standalone/io/file_system_watcher_test.dart |
diff --git a/tests/standalone/io/file_system_watcher_test.dart b/tests/standalone/io/file_system_watcher_test.dart |
index 6b37799c307dbdc26fdee8f836c269714895c916..4540b608f2d25641304806594088fa208c348976 100644 |
--- a/tests/standalone/io/file_system_watcher_test.dart |
+++ b/tests/standalone/io/file_system_watcher_test.dart |
@@ -111,6 +111,24 @@ void testWatchDeleteFile() { |
} |
+void testWatchDeleteDir() { |
+ var dir = Directory.systemTemp.createTempSync('dart_file_system_watcher'); |
+ var watcher = dir.watch(events: 0); |
+ |
+ asyncStart(); |
+ var sub; |
+ sub = watcher.listen((event) { |
+ if (event is FileSystemDeleteEvent) { |
+ Expect.isTrue(event.path == dir.path); |
+ } |
+ }, onDone: () { |
+ asyncEnd(); |
+ }); |
+ |
+ dir.deleteSync(); |
+} |
+ |
+ |
void testWatchOnlyModifyFile() { |
var dir = Directory.systemTemp.createTempSync('dart_file_system_watcher'); |
var file = new File(dir.path + '/file'); |
@@ -244,6 +262,7 @@ void main() { |
testWatchModifyFile(); |
testWatchMoveFile(); |
testWatchDeleteFile(); |
+ testWatchDeleteDir(); |
testWatchOnlyModifyFile(); |
testMultipleEvents(); |
testWatchNonRecursive(); |