Index: pkg/analysis_server/test/context_manager_test.dart |
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart |
index db575569b5b5bf94f974e068f3d119a678044bbd..ba768ce84c44c95a2c0445ae32040ea349800d1b 100644 |
--- a/pkg/analysis_server/test/context_manager_test.dart |
+++ b/pkg/analysis_server/test/context_manager_test.dart |
@@ -937,6 +937,26 @@ test_pack:lib/ |
_checkPackageMap(projPath, equals(packageMapProvider.packageMap)); |
} |
+ void test_setRoots_noContext_inDotFolder() { |
+ String pubspecPath = posix.join(projPath, '.pub', 'pubspec.yaml'); |
+ resourceProvider.newFile(pubspecPath, 'name: test'); |
+ manager.setRoots(<String>[projPath], <String>[], <String, String>{}); |
+ // verify |
+ expect(callbacks.currentContextPaths, hasLength(1)); |
+ expect(callbacks.currentContextPaths, contains(projPath)); |
+ expect(callbacks.currentContextFilePaths[projPath], hasLength(0)); |
+ } |
+ |
+ void test_setRoots_noContext_inPackagesFolder() { |
+ String pubspecPath = posix.join(projPath, 'packages', 'pubspec.yaml'); |
+ resourceProvider.newFile(pubspecPath, 'name: test'); |
+ manager.setRoots(<String>[projPath], <String>[], <String, String>{}); |
+ // verify |
+ expect(callbacks.currentContextPaths, hasLength(1)); |
+ expect(callbacks.currentContextPaths, contains(projPath)); |
+ expect(callbacks.currentContextFilePaths[projPath], hasLength(0)); |
+ } |
+ |
void test_setRoots_packageResolver() { |
Uri uri = Uri.parse('package:foo/foo.dart'); |
Source source = new TestSource(); |