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

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

Issue 12437017: dart:io | Make broken links report NOT_FOUND from FileSystemEntity.typeSync on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove TODO comment. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/file_win.cc ('k') | 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) 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:io"; 5 import "dart:io";
6 import "dart:isolate"; 6 import "dart:isolate";
7 7
8 testJunctionTypeDelete() { 8 testJunctionTypeDelete() {
9 var temp = new Directory('').createTempSync(); 9 var temp = new Directory('').createTempSync();
10 var x = '${temp.path}${Platform.pathSeparator}x'; 10 var x = '${temp.path}${Platform.pathSeparator}x';
(...skipping 14 matching lines...) Expand all
25 Expect.equals(FileSystemEntityType.LINK, 25 Expect.equals(FileSystemEntityType.LINK,
26 FileSystemEntity.typeSync(y, followLinks: false)); 26 FileSystemEntity.typeSync(y, followLinks: false));
27 Expect.equals(FileSystemEntityType.DIRECTORY, 27 Expect.equals(FileSystemEntityType.DIRECTORY,
28 FileSystemEntity.typeSync(x, followLinks: false)); 28 FileSystemEntity.typeSync(x, followLinks: false));
29 // Test Junction pointing to a missing directory. 29 // Test Junction pointing to a missing directory.
30 new Directory(x).deleteSync(); 30 new Directory(x).deleteSync();
31 Expect.isTrue(new Directory(y).existsSync()); 31 Expect.isTrue(new Directory(y).existsSync());
32 Expect.isFalse(new Directory(x).existsSync()); 32 Expect.isFalse(new Directory(x).existsSync());
33 Expect.isTrue(FileSystemEntity.isLinkSync(y)); 33 Expect.isTrue(FileSystemEntity.isLinkSync(y));
34 Expect.isFalse(FileSystemEntity.isLinkSync(x)); 34 Expect.isFalse(FileSystemEntity.isLinkSync(x));
35 Expect.isTrue(FileSystemEntity.isDirectorySync(y)); 35 Expect.isFalse(FileSystemEntity.isDirectorySync(y));
36 Expect.isFalse(FileSystemEntity.isDirectorySync(x)); 36 Expect.isFalse(FileSystemEntity.isDirectorySync(x));
37 Expect.equals(FileSystemEntityType.DIRECTORY, 37 Expect.equals(FileSystemEntityType.NOT_FOUND,
38 FileSystemEntity.typeSync(y)); 38 FileSystemEntity.typeSync(y));
39 Expect.equals(FileSystemEntityType.NOT_FOUND, 39 Expect.equals(FileSystemEntityType.NOT_FOUND,
40 FileSystemEntity.typeSync(x)); 40 FileSystemEntity.typeSync(x));
41 Expect.equals(FileSystemEntityType.LINK, 41 Expect.equals(FileSystemEntityType.LINK,
42 FileSystemEntity.typeSync(y, followLinks: false)); 42 FileSystemEntity.typeSync(y, followLinks: false));
43 Expect.equals(FileSystemEntityType.NOT_FOUND, 43 Expect.equals(FileSystemEntityType.NOT_FOUND,
44 FileSystemEntity.typeSync(x, followLinks: false)); 44 FileSystemEntity.typeSync(x, followLinks: false));
45 45
46 // Delete Junction pointing to a missing directory. 46 // Delete Junction pointing to a missing directory.
47 new Directory(y).deleteSync(); 47 new Directory(y).deleteSync();
(...skipping 22 matching lines...) Expand all
70 }); 70 });
71 }); 71 });
72 } 72 }
73 73
74 74
75 main() { 75 main() {
76 if (Platform.operatingSystem == 'windows') { 76 if (Platform.operatingSystem == 'windows') {
77 testJunctionTypeDelete(); 77 testJunctionTypeDelete();
78 } 78 }
79 } 79 }
OLDNEW
« no previous file with comments | « runtime/bin/file_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698