diff --git a/tests/lib/isolate/remove_error_listener_test.dart b/tests/lib/isolate/remove_error_listener_test.dart index 3d16fa6318e..f2599d8b705 100644 --- a/tests/lib/isolate/remove_error_listener_test.dart +++ b/tests/lib/isolate/remove_error_listener_test.dart @@ -16,8 +16,8 @@ void main(List args) { Platform.script.toFilePath(), 'child' ]); - Expect.isTrue( - result.stderr.contains("Unhandled exception:\nException: Oops!")); + Expect.isTrue(result.stderr.contains( + "Unhandled exception:${Platform.lineTerminator}Exception: Oops!")); return; } { diff --git a/tests/lib_2/isolate/remove_error_listener_test.dart b/tests/lib_2/isolate/remove_error_listener_test.dart index ceba7ae6d64..c6102522532 100644 --- a/tests/lib_2/isolate/remove_error_listener_test.dart +++ b/tests/lib_2/isolate/remove_error_listener_test.dart @@ -18,8 +18,8 @@ void main(List args) { Platform.script.toFilePath(), 'child' ]); - Expect.isTrue( - result.stderr.contains("Unhandled exception:\nException: Oops!")); + Expect.isTrue(result.stderr.contains( + "Unhandled exception:${Platform.lineTerminator}Exception: Oops!")); return; } {