| 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 0baa6fc079faf6effaeb53ab80b7fcedfbb32051..49c199fccb30369f4508748dce16e136f7ded5d3 100644
|
| --- a/pkg/analysis_server/test/context_manager_test.dart
|
| +++ b/pkg/analysis_server/test/context_manager_test.dart
|
| @@ -1013,6 +1013,17 @@ test_pack:lib/
|
| callbacks.assertContextFiles(project, [fileA, fileB]);
|
| }
|
|
|
| + void test_setRoots_ignoreDocFolder() {
|
| + String project = '/project';
|
| + String fileA = '$project/foo.dart';
|
| + String fileB = '$project/doc/bar.dart';
|
| + resourceProvider.newFile(fileA, '');
|
| + resourceProvider.newFile(fileB, '');
|
| + manager.setRoots(<String>[project], <String>[], <String, String>{});
|
| + callbacks.assertContextPaths([project]);
|
| + callbacks.assertContextFiles(project, [fileA]);
|
| + }
|
| +
|
| void test_setRoots_newFolderWithPackageRoot() {
|
| String packageRootPath = '/package';
|
| manager.setRoots(<String>[projPath], <String>[],
|
| @@ -1297,6 +1308,25 @@ analyzer:
|
| });
|
| }
|
|
|
| + test_watch_addFile_inDocFolder() {
|
| + // prepare paths
|
| + String project = '/project';
|
| + String fileA = '$project/a.dart';
|
| + String fileB = '$project/doc/b.dart';
|
| + // create files
|
| + resourceProvider.newFile(fileA, '');
|
| + // set roots
|
| + manager.setRoots(<String>[project], <String>[], <String, String>{});
|
| + callbacks.assertContextPaths([project]);
|
| + callbacks.assertContextFiles(project, [fileA]);
|
| + // add a "doc" file, it is ignored
|
| + resourceProvider.newFile(fileB, '');
|
| + return pumpEventQueue().then((_) {
|
| + callbacks.assertContextPaths([project]);
|
| + callbacks.assertContextFiles(project, [fileA]);
|
| + });
|
| + }
|
| +
|
| test_watch_addFile_pathContainsDotFile() async {
|
| // If a file is added and the path to it (relative to the context root)
|
| // contains a folder whose name begins with '.', then the file is ignored.
|
|
|