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

Side by Side Diff: tests/standalone/io/file_system_links_test.dart

Issue 13654002: Change how File/Directory/Link .delete works. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix windows error codes. Created 7 years, 8 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
OLDNEW
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 "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "dart:io"; 6 import "dart:io";
7 import "dart:isolate"; 7 import "dart:isolate";
8 8
9 9
10 createLink(String dst, String link, void callback()) { 10 createLink(String dst, String link, void callback()) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 Expect.isTrue(FileSystemEntity.isDirectorySync(y)); 51 Expect.isTrue(FileSystemEntity.isDirectorySync(y));
52 Expect.isTrue(FileSystemEntity.isDirectorySync(x)); 52 Expect.isTrue(FileSystemEntity.isDirectorySync(x));
53 Expect.equals(FileSystemEntityType.DIRECTORY, FileSystemEntity.typeSync(y)); 53 Expect.equals(FileSystemEntityType.DIRECTORY, FileSystemEntity.typeSync(y));
54 Expect.equals(FileSystemEntityType.DIRECTORY, FileSystemEntity.typeSync(x)); 54 Expect.equals(FileSystemEntityType.DIRECTORY, FileSystemEntity.typeSync(x));
55 Expect.equals(FileSystemEntityType.LINK, 55 Expect.equals(FileSystemEntityType.LINK,
56 FileSystemEntity.typeSync(y, followLinks: false)); 56 FileSystemEntity.typeSync(y, followLinks: false));
57 Expect.equals(FileSystemEntityType.DIRECTORY, 57 Expect.equals(FileSystemEntityType.DIRECTORY,
58 FileSystemEntity.typeSync(x, followLinks: false)); 58 FileSystemEntity.typeSync(x, followLinks: false));
59 Expect.equals(x, new Link(y).targetSync()); 59 Expect.equals(x, new Link(y).targetSync());
60 60
61 new File(y).deleteSync(); 61 new Link(y).deleteSync();
62 Expect.isFalse(FileSystemEntity.isLinkSync(y)); 62 Expect.isFalse(FileSystemEntity.isLinkSync(y));
63 Expect.isFalse(FileSystemEntity.isLinkSync(x)); 63 Expect.isFalse(FileSystemEntity.isLinkSync(x));
64 Expect.equals(FileSystemEntityType.NOT_FOUND, FileSystemEntity.typeSync(y)); 64 Expect.equals(FileSystemEntityType.NOT_FOUND, FileSystemEntity.typeSync(y));
65 Expect.equals(FileSystemEntityType.DIRECTORY, FileSystemEntity.typeSync(x)); 65 Expect.equals(FileSystemEntityType.DIRECTORY, FileSystemEntity.typeSync(x));
66 Expect.throws(() => new Link(y).targetSync()); 66 Expect.throws(() => new Link(y).targetSync());
67 67
68 temp.deleteSync(recursive: true); 68 temp.deleteSync(recursive: true);
69 }); 69 });
70 } 70 }
71 71
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 main() { 241 main() {
242 testFileExistsCreate(); 242 testFileExistsCreate();
243 testFileDelete(); 243 testFileDelete();
244 testFileWriteRead(); 244 testFileWriteRead();
245 testDirectoryExistsCreate(); 245 testDirectoryExistsCreate();
246 testDirectoryDelete(); 246 testDirectoryDelete();
247 testDirectoryListing(); 247 testDirectoryListing();
248 testDirectoryListingBrokenLink(); 248 testDirectoryListingBrokenLink();
249 } 249 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698