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

Unified Diff: pkg/analysis_server/test/context_directory_manager_test.dart

Issue 367483002: Ignore bogus links, such as those created by emacs for files being edited. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « pkg/analysis_server/lib/src/resource.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/context_directory_manager_test.dart
diff --git a/pkg/analysis_server/test/context_directory_manager_test.dart b/pkg/analysis_server/test/context_directory_manager_test.dart
index ed27b010f6260683223ff3207210951e06ac84a5..75fbf2274458963df223b8c7de1cd32275c38edd 100644
--- a/pkg/analysis_server/test/context_directory_manager_test.dart
+++ b/pkg/analysis_server/test/context_directory_manager_test.dart
@@ -133,6 +133,16 @@ main() {
expect(filePaths, contains(filePath));
});
+ test('add folder with dummy link', () {
+ String projPath = '/my/proj';
+ resourceProvider.newFolder(projPath);
+ String filePath = posix.join(projPath, 'foo.dart');
+ resourceProvider.newDummyLink(filePath);
+ manager.setRoots(<String>[projPath], <String>[]);
+ var filePaths = manager.currentContextFilePaths[projPath];
+ expect(filePaths, isEmpty);
+ });
+
test('add folder with dart file in subdir', () {
String projPath = '/my/proj';
resourceProvider.newFolder(projPath);
@@ -190,6 +200,17 @@ main() {
resourceProvider.newFolder(projPath);
});
+ test('Add dummy link', () {
+ manager.setRoots(<String>[projPath], <String>[]);
+ Map<String, int> filePaths = manager.currentContextFilePaths[projPath];
+ expect(filePaths, isEmpty);
+ String filePath = posix.join(projPath, 'foo.dart');
+ resourceProvider.newDummyLink(filePath);
+ return pumpEventQueue().then((_) {
+ expect(filePaths, isEmpty);
+ });
+ });
+
test('Add file', () {
manager.setRoots(<String>[projPath], <String>[]);
Map<String, int> filePaths = manager.currentContextFilePaths[projPath];
« no previous file with comments | « pkg/analysis_server/lib/src/resource.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698