Index: pkg/analysis_server/test/analysis_server_test.dart |
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart |
index 0576d89e26466a79dd4ab9513fef5841d551a0ce..eb6387da373d106542acf90522f666a5aa7264b9 100644 |
--- a/pkg/analysis_server/test/analysis_server_test.dart |
+++ b/pkg/analysis_server/test/analysis_server_test.dart |
@@ -243,6 +243,20 @@ import "../foo/foo.dart"; |
expect(source.fullName, filePath); |
} |
+ test_getContextSourcePair_nonFile() { |
+ String dirPath = '/dir'; |
+ Folder dir = resourceProvider.newFolder(dirPath); |
+ |
+ AnalysisContext context = AnalysisEngine.instance.createAnalysisContext(); |
+ _configureSourceFactory(context); |
+ server.folderMap[dir] = context; |
+ |
+ ContextSourcePair pair = server.getContextSourcePair(dirPath); |
+ expect(pair, isNotNull); |
+ expect(pair.context, isNull); |
+ expect(pair.source, isNull); |
+ } |
+ |
test_getContextSourcePair_package_inRoot() { |
String rootPath = '/my_package'; |
String filePath = rootPath + '/lib/file.dart'; |