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

Side by Side Diff: pkg/watcher/test/directory_watcher/shared.dart

Issue 127033002: I guess Linux doesn't iterate over folders alphabetically. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
6 6
7 import '../utils.dart'; 7 import '../utils.dart';
8 8
9 sharedTests() { 9 sharedTests() {
10 test('does not notify for files that already exist when started', () { 10 test('does not notify for files that already exist when started', () {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 writeFile("file.txt", contents: "modified"); 48 writeFile("file.txt", contents: "modified");
49 expectModifyEvent("file.txt"); 49 expectModifyEvent("file.txt");
50 writeFile("file.txt", contents: "modified again"); 50 writeFile("file.txt", contents: "modified again");
51 expectModifyEvent("file.txt"); 51 expectModifyEvent("file.txt");
52 }); 52 });
53 53
54 test('notifies even if the file contents are unchanged', () { 54 test('notifies even if the file contents are unchanged', () {
55 writeFile("a.txt", contents: "same"); 55 writeFile("a.txt", contents: "same");
56 writeFile("b.txt", contents: "before"); 56 writeFile("b.txt", contents: "before");
57 startWatcher(); 57 startWatcher();
58
58 writeFile("a.txt", contents: "same"); 59 writeFile("a.txt", contents: "same");
59 writeFile("b.txt", contents: "after"); 60 writeFile("b.txt", contents: "after");
60 expectModifyEvent("a.txt"); 61 inAnyOrder(() {
61 expectModifyEvent("b.txt"); 62 expectModifyEvent("a.txt");
63 expectModifyEvent("b.txt");
64 });
62 }); 65 });
63 66
64 test('when the watched directory is deleted, removes all files', () { 67 test('when the watched directory is deleted, removes all files', () {
65 writeFile("dir/a.txt"); 68 writeFile("dir/a.txt");
66 writeFile("dir/b.txt"); 69 writeFile("dir/b.txt");
67 70
68 startWatcher(dir: "dir"); 71 startWatcher(dir: "dir");
69 72
70 deleteDir("dir"); 73 deleteDir("dir");
71 inAnyOrder(() { 74 inAnyOrder(() {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 deleteFile("dir/sub"); 242 deleteFile("dir/sub");
240 renameDir("old", "dir/sub"); 243 renameDir("old", "dir/sub");
241 inAnyOrder(() { 244 inAnyOrder(() {
242 expectRemoveEvent("dir/sub"); 245 expectRemoveEvent("dir/sub");
243 withPermutations((i, j, k) => 246 withPermutations((i, j, k) =>
244 expectAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")); 247 expectAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt"));
245 }); 248 });
246 }); 249 });
247 }); 250 });
248 } 251 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698