Index: pkg/analysis_server/test/domain_analysis_test.dart |
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart |
index 2c6fc7b69a19d4d00881528e56b23674844955f5..b7f4b34f29144d17688d1ee19ff9bcc4a37f008d 100644 |
--- a/pkg/analysis_server/test/domain_analysis_test.dart |
+++ b/pkg/analysis_server/test/domain_analysis_test.dart |
@@ -119,6 +119,22 @@ main() { |
expect(serverRef.getResolvedCompilationUnits(fileB), isEmpty); |
}); |
}); |
+ |
+ test('not absolute', () async { |
+ var response = testSetAnalysisRoots([], ['foo/bar']); |
+ expect( |
+ response, |
+ isResponseFailure( |
+ '0', RequestErrorCode.INVALID_FILE_PATH_FORMAT)); |
+ }); |
+ |
+ test('not normalized', () async { |
+ var response = testSetAnalysisRoots([], ['/foo/../bar']); |
+ expect( |
+ response, |
+ isResponseFailure( |
+ '0', RequestErrorCode.INVALID_FILE_PATH_FORMAT)); |
+ }); |
}); |
group('included', () { |
@@ -147,6 +163,22 @@ main() { |
await server.onAnalysisComplete; |
expect(serverRef.getResolvedCompilationUnits(fileB), hasLength(1)); |
}); |
+ |
+ test('not absolute', () async { |
+ var response = testSetAnalysisRoots(['foo/bar'], []); |
+ expect( |
+ response, |
+ isResponseFailure( |
+ '0', RequestErrorCode.INVALID_FILE_PATH_FORMAT)); |
+ }); |
+ |
+ test('not normalized', () async { |
+ var response = testSetAnalysisRoots(['/foo/../bar'], []); |
+ expect( |
+ response, |
+ isResponseFailure( |
+ '0', RequestErrorCode.INVALID_FILE_PATH_FORMAT)); |
+ }); |
}); |
}); |
@@ -167,8 +199,9 @@ main() { |
resourceProvider.newFile('/p2/b.dart', 'library b;'); |
resourceProvider.newFile('/p2/c.dart', 'library c;'); |
- var setRootsRequest = new AnalysisSetAnalysisRootsParams( |
- ['/p1', '/p2'], []).toRequest('0'); |
+ var setRootsRequest = |
+ new AnalysisSetAnalysisRootsParams(['/p1', '/p2'], []) |
+ .toRequest('0'); |
var setRootsResponse = handler.handleRequest(setRootsRequest); |
expect(setRootsResponse, isResponseSuccess('0')); |