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

Unified Diff: tests/standalone/io/file_system_links_test.dart

Issue 13578003: Fix directory-listing, directory-deletion and file deletion, when links are involved. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use Link for Link removal. Created 7 years, 9 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
« no previous file with comments | « tests/standalone/io/directory_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_system_links_test.dart
diff --git a/tests/standalone/io/file_system_links_test.dart b/tests/standalone/io/file_system_links_test.dart
index a1bd0af5480cef855b62261c3163379fb683b17f..7c3cdc7c320ca3fb5e4670d638977c311b81d9b4 100644
--- a/tests/standalone/io/file_system_links_test.dart
+++ b/tests/standalone/io/file_system_links_test.dart
@@ -206,15 +206,17 @@ testDirectoryListingBrokenLink() {
var doesNotExist = 'this_thing_does_not_exist';
new File(x).createSync();
createLink(doesNotExist, link, () {
- Expect.throws(() => temp.listSync(recursive: true),
- (e) => e is DirectoryIOException);
+ temp.listSync(recursive: true); // No exceptions.
var files = [];
var dirs = [];
+ var links = [];
var errors = [];
temp.list(recursive: true).listen(
(entity) {
if (entity is File) {
files.add(entity.path);
+ } else if (entity is Link) {
+ links.add(entity.path);
} else {
Expect.isTrue(entity is Directory);
dirs.add(entity.path);
@@ -224,9 +226,10 @@ testDirectoryListingBrokenLink() {
onDone: () {
Expect.equals(1, files.length);
Expect.isTrue(files[0].endsWith(x));
+ Expect.equals(1, links.length);
+ Expect.isTrue(links[0].endsWith(link));
Expect.equals(0, dirs.length);
- Expect.equals(1, errors.length);
- Expect.isTrue(errors[0].toString().contains(link));
+ Expect.equals(0, errors.length);
temp.deleteSync(recursive: true);
keepAlive.close();
});
« no previous file with comments | « tests/standalone/io/directory_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698