Index: pkg/analysis_server/test/edit/format_test.dart |
diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart |
index 1bd9f709d35503b5522f35cddb4eca40e486dabd..b045e1a19d339082db3e4aa66ed01480a957bd37 100644 |
--- a/pkg/analysis_server/test/edit/format_test.dart |
+++ b/pkg/analysis_server/test/edit/format_test.dart |
@@ -13,6 +13,7 @@ import 'package:analyzer/src/plugin/plugin_impl.dart'; |
import 'package:unittest/unittest.dart' hide ERROR; |
import '../analysis_abstract.dart'; |
+import '../mocks.dart'; |
import '../reflective_tests.dart'; |
main() { |
@@ -87,6 +88,17 @@ main() { |
}); |
} |
+ Future test_withErrors() { |
+ addTestFile(''' |
+main() { int x = |
+'''); |
+ return waitForTasksFinished().then((_) { |
+ Request request = new EditFormatParams(testFile, 0, 3).toRequest('0'); |
+ Response response = handler.handleRequest(request); |
+ expect(response, isResponseFailure('0')); |
+ }); |
+ } |
+ |
EditFormatResult _formatAt(int selectionOffset, int selectionLength) { |
Request request = new EditFormatParams( |
testFile, selectionOffset, selectionLength).toRequest('0'); |