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

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

Issue 303413003: Don't add files inside "packages" subdir to context. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 f9d359e5fa62fe89760ce6bf0b55026c506c655f..283dd63d277d55679afcd3b0b7f54d97db76c123 100644
--- a/pkg/analysis_server/test/context_directory_manager_test.dart
+++ b/pkg/analysis_server/test/context_directory_manager_test.dart
@@ -97,6 +97,23 @@ main() {
expect(filePaths, contains(filePath));
});
+ test('ignore files in packages dir', () {
+ String projPath = '/my/proj';
+ provider.newFolder(projPath);
+ String pubspecPath = posix.join(projPath, 'pubspec.yaml');
+ provider.newFile(pubspecPath, 'pubspec');
+ String filePath1 = posix.join(projPath, 'packages', 'file1.dart');
+ provider.newFile(filePath1, 'contents');
+ manager.setRoots(<String>[projPath], <String>[]);
+ Set<String> filePaths = manager.currentContextFilePaths[projPath];
+ expect(filePaths, hasLength(0));
+ String filePath2 = posix.join(projPath, 'packages', 'file2.dart');
+ provider.newFile(filePath2, 'contents');
+ return pumpEventQueue().then((_) {
+ expect(filePaths, hasLength(0));
+ });
+ });
+
group('detect context modifications', () {
String 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