| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "dart:async"; | 5 import "dart:async"; |
| 6 import "dart:io"; | 6 import "dart:io"; |
| 7 | 7 |
| 8 import "package:async_helper/async_helper.dart"; | 8 import "package:async_helper/async_helper.dart"; |
| 9 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
| 10 | 10 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 230 |
| 231 new Timer(const Duration(milliseconds: 300), () { | 231 new Timer(const Duration(milliseconds: 300), () { |
| 232 sub.cancel(); | 232 sub.cancel(); |
| 233 asyncEnd(); | 233 asyncEnd(); |
| 234 dir.deleteSync(recursive: true); | 234 dir.deleteSync(recursive: true); |
| 235 }); | 235 }); |
| 236 } | 236 } |
| 237 | 237 |
| 238 | 238 |
| 239 void main() { | 239 void main() { |
| 240 if (!FileSystemEntity.isWatchSupported) return; |
| 240 testWatchCreateFile(); | 241 testWatchCreateFile(); |
| 241 testWatchModifyFile(); | 242 testWatchModifyFile(); |
| 242 testWatchMoveFile(); | 243 testWatchMoveFile(); |
| 243 testWatchDeleteFile(); | 244 testWatchDeleteFile(); |
| 244 testWatchOnlyModifyFile(); | 245 testWatchOnlyModifyFile(); |
| 245 testMultipleEvents(); | 246 testMultipleEvents(); |
| 246 testWatchNonRecursive(); | 247 testWatchNonRecursive(); |
| 247 } | 248 } |
| OLD | NEW |