From 7d7ac7c32bca7f6ef629020eac1d6aa18793abb4 Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Thu, 20 Feb 2020 10:16:28 +0100 Subject: [PATCH] start multiline strings with newline (#50825) --- dev/bots/test/prepare_package_test.dart | 3 +- .../test/running_processes_test.dart | 3 +- dev/tools/dartdoc.dart | 3 +- .../test/localization/gen_l10n_test.dart | 69 ++++++++++++------- .../lib/demo/fortnightly/fortnightly.dart | 30 ++++---- .../test/example_code_parser_test.dart | 3 +- .../test/animation/animations_test.dart | 4 +- .../test/foundation/assertions_test.dart | 6 +- .../test/widgets/scroll_physics_test.dart | 4 +- .../flutter_driver/lib/src/common/error.dart | 5 +- packages/flutter_tools/lib/src/plugins.dart | 24 ++++--- .../lib/src/reporting/github_template.dart | 3 +- .../permeable/analyze_once_test.dart | 6 +- .../commands.shard/permeable/create_test.dart | 3 +- .../general.shard/android/gradle_test.dart | 8 +-- .../application_package_test.dart | 28 ++++---- .../general.shard/github_template_test.dart | 3 +- .../src/runners/ssh_command_runner_test.dart | 3 +- 18 files changed, 127 insertions(+), 81 deletions(-) diff --git a/dev/bots/test/prepare_package_test.dart b/dev/bots/test/prepare_package_test.dart index 2f33ac9914..9a857870d5 100644 --- a/dev/bots/test/prepare_package_test.dart +++ b/dev/bots/test/prepare_package_test.dart @@ -250,7 +250,8 @@ void main() { final String gsArchivePath = 'gs://flutter_infra/releases/stable/$platformName/$archiveName'; final String jsonPath = path.join(tempDir.absolute.path, releasesName); final String gsJsonPath = 'gs://flutter_infra/releases/$releasesName'; - final String releasesJson = '''{ + final String releasesJson = ''' +{ "base_url": "https://storage.googleapis.com/flutter_infra/releases", "current_release": { "beta": "3ea4d06340a97a1e9d7cae97567c64e0569dcaa2", diff --git a/dev/devicelab/test/running_processes_test.dart b/dev/devicelab/test/running_processes_test.dart index 11d46d4c9c..ec27b8e742 100644 --- a/dev/devicelab/test/running_processes_test.dart +++ b/dev/devicelab/test/running_processes_test.dart @@ -42,7 +42,8 @@ ProcessId CreationDate CommandLine }); test('Parse Posix output', () { - const String psOutput = r'''STARTED PID COMMAND + const String psOutput = r''' +STARTED PID COMMAND Sat Mar 9 20:12:47 2019 1 /sbin/launchd Sat Mar 9 20:13:00 2019 49 /usr/sbin/syslogd '''; diff --git a/dev/tools/dartdoc.dart b/dev/tools/dartdoc.dart index 17ce236e78..c603aac375 100644 --- a/dev/tools/dartdoc.dart +++ b/dev/tools/dartdoc.dart @@ -274,7 +274,8 @@ void createFooter(String footerPath, String version) { File('${footerPath}footer.html').writeAsStringSync(''); File('$kPublishRoot/api/footer.js') ..createSync(recursive: true) - ..writeAsStringSync('''(function() { + ..writeAsStringSync(''' +(function() { var span = document.querySelector('footer>span'); if (span) { span.innerText = 'Flutter $version • $timestamp • ${gitRevision()} $gitBranchOut'; diff --git a/dev/tools/test/localization/gen_l10n_test.dart b/dev/tools/test/localization/gen_l10n_test.dart index e6af042ee9..7847b79b47 100644 --- a/dev/tools/test/localization/gen_l10n_test.dart +++ b/dev/tools/test/localization/gen_l10n_test.dart @@ -18,7 +18,8 @@ final String defaultArbPathString = path.join('lib', 'l10n'); const String defaultTemplateArbFileName = 'app_en_US.arb'; const String defaultOutputFileString = 'output-localization-file'; const String defaultClassNameString = 'AppLocalizations'; -const String singleMessageArbFileString = '''{ +const String singleMessageArbFileString = ''' +{ "title": "Title", "@title": { "description": "Title for the application" @@ -26,10 +27,12 @@ const String singleMessageArbFileString = '''{ }'''; const String esArbFileName = 'app_es.arb'; -const String singleEsMessageArbFileString = '''{ +const String singleEsMessageArbFileString = ''' +{ "title": "Título" }'''; -const String singleZhMessageArbFileString = '''{ +const String singleZhMessageArbFileString = ''' +{ "title": "标题" }'''; @@ -431,7 +434,8 @@ void main() { }); test('correctly parses @@locale property in arb file', () { - const String arbFileWithEnLocale = '''{ + const String arbFileWithEnLocale = ''' +{ "@@locale": "en", "title": "Title", "@title": { @@ -439,7 +443,8 @@ void main() { } }'''; - const String arbFileWithZhLocale = '''{ + const String arbFileWithZhLocale = ''' +{ "@@locale": "zh", "title": "标题", "@title": { @@ -473,7 +478,8 @@ void main() { }); test('correctly prioritizes @@locale property in arb file over filename', () { - const String arbFileWithEnLocale = '''{ + const String arbFileWithEnLocale = ''' +{ "@@locale": "en", "title": "Stocks", "@title": { @@ -481,7 +487,8 @@ void main() { } }'''; - const String arbFileWithZhLocale = '''{ + const String arbFileWithZhLocale = ''' +{ "@@locale": "zh", "title": "标题", "@title": { @@ -542,7 +549,8 @@ void main() { ); }); test('throws when the same locale is detected more than once', () { - const String secondMessageArbFileString = '''{ + const String secondMessageArbFileString = ''' +{ "market": "MARKET", "@market": { "description": "Label for the Market tab" @@ -580,7 +588,8 @@ void main() { group('generateClassMethods', () { group('DateTime tests', () { test('throws an exception when improperly formatted date is passed in', () { - const String singleDateMessageArbFileString = '''{ + const String singleDateMessageArbFileString = ''' +{ "springBegins": "Spring begins on {springStartDate}", "@springBegins": { "description": "The first day of spring", @@ -618,7 +627,8 @@ void main() { }); test('throws an exception when no format attribute is passed in', () { - const String singleDateMessageArbFileString = '''{ + const String singleDateMessageArbFileString = ''' +{ "springBegins": "Spring begins on {springStartDate}", "@springBegins": { "description": "The first day of spring", @@ -653,7 +663,8 @@ void main() { }); test('correctly generates simple message with date along with other placeholders', () { - const String singleDateMessageArbFileString = '''{ + const String singleDateMessageArbFileString = ''' +{ "springGreetings": "Since it's {springStartDate}, it's finally spring! {helloWorld}!", "@springGreetings": { "description": "A realization that it's finally the spring season, followed by a greeting.", @@ -721,7 +732,8 @@ void main() { }; for (final String numberFormat in numberFormatsWithNamedParameters) { - final String singleNumberMessage = '''{ + final String singleNumberMessage = ''' +{ "courseCompletion": "You have completed {progress} of the course.", "@courseCompletion": { "description": "The amount of progress the student has made in their class.", @@ -788,7 +800,8 @@ void main() { }; for (final String numberFormat in numberFormatsWithPositionalParameters) { - final String singleNumberMessage = '''{ + final String singleNumberMessage = ''' +{ "courseCompletion": "You have completed {progress} of the course.", "@courseCompletion": { "description": "The amount of progress the student has made in their class.", @@ -843,7 +856,8 @@ void main() { }); test('throws an exception when improperly formatted number is passed in', () { - const String singleDateMessageArbFileString = '''{ + const String singleDateMessageArbFileString = ''' +{ "courseCompletion": "You have completed {progress} of the course.", "@courseCompletion": { "description": "The amount of progress the student has made in their class.", @@ -883,7 +897,8 @@ void main() { group('plural messages', () { test('should throw attempting to generate a plural message without placeholders', () { - const String pluralMessageWithoutPlaceholdersAttribute = '''{ + const String pluralMessageWithoutPlaceholdersAttribute = ''' +{ "helloWorlds": "{count,plural, =0{Hello}=1{Hello World}=2{Hello two worlds}few{Hello {count} worlds}many{Hello all {count} worlds}other{Hello other {count} worlds}}", "@helloWorlds": { "description": "Improperly formatted since it has no placeholder attribute." @@ -913,7 +928,8 @@ void main() { }); test('should throw attempting to generate a plural message with an empty placeholders map', () { - const String pluralMessageWithEmptyPlaceholdersMap = '''{ + const String pluralMessageWithEmptyPlaceholdersMap = ''' +{ "helloWorlds": "{count,plural, =0{Hello}=1{Hello World}=2{Hello two worlds}few{Hello {count} worlds}many{Hello all {count} worlds}other{Hello other {count} worlds}}", "@helloWorlds": { "description": "Improperly formatted since it has no placeholder attribute.", @@ -944,7 +960,8 @@ void main() { }); test('should throw attempting to generate a plural message with no resource attributes', () { - const String pluralMessageWithoutResourceAttributes = '''{ + const String pluralMessageWithoutResourceAttributes = ''' +{ "helloWorlds": "{count,plural, =0{Hello}=1{Hello World}=2{Hello two worlds}few{Hello {count} worlds}many{Hello all {count} worlds}other{Hello other {count} worlds}}" }'''; @@ -971,7 +988,8 @@ void main() { }); test('should throw attempting to generate a plural message with incorrect format for placeholders', () { - const String pluralMessageWithIncorrectPlaceholderFormat = '''{ + const String pluralMessageWithIncorrectPlaceholderFormat = ''' +{ "helloWorlds": "{count,plural, =0{Hello}=1{Hello World}=2{Hello two worlds}few{Hello {count} worlds}many{Hello all {count} worlds}other{Hello other {count} worlds}}", "@helloWorlds": { "placeholders": "Incorrectly a string, should be a map." @@ -1003,7 +1021,8 @@ void main() { }); test('should throw when failing to parse the arb file', () { - const String arbFileWithTrailingComma = '''{ + const String arbFileWithTrailingComma = ''' +{ "title": "Stocks", "@title": { "description": "Title for the Stocks application" @@ -1036,7 +1055,8 @@ void main() { }); test('should throw when resource is missing resource attribute', () { - const String arbFileWithMissingResourceAttribute = '''{ + const String arbFileWithMissingResourceAttribute = ''' +{ "title": "Stocks" }'''; final Directory l10nDirectory = fs.currentDirectory.childDirectory('lib').childDirectory('l10n') @@ -1067,7 +1087,8 @@ void main() { group('checks for method/getter formatting', () { test('cannot contain non-alphanumeric symbols', () { - const String nonAlphaNumericArbFile = '''{ + const String nonAlphaNumericArbFile = ''' +{ "title!!": "Stocks", "@title!!": { "description": "Title for the Stocks application" @@ -1097,7 +1118,8 @@ void main() { }); test('must start with lowercase character', () { - const String nonAlphaNumericArbFile = '''{ + const String nonAlphaNumericArbFile = ''' +{ "Title": "Stocks", "@Title": { "description": "Title for the Stocks application" @@ -1127,7 +1149,8 @@ void main() { }); test('cannot start with a number', () { - const String nonAlphaNumericArbFile = '''{ + const String nonAlphaNumericArbFile = ''' +{ "123title": "Stocks", "@123title": { "description": "Title for the Stocks application" diff --git a/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart b/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart index 1afb92be72..e68dac3159 100644 --- a/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart +++ b/examples/flutter_gallery/lib/demo/fortnightly/fortnightly.dart @@ -66,21 +66,23 @@ class ShortAppBar extends StatelessWidget { } class FruitPage extends StatelessWidget { - static final String paragraph1 = '''Have you ever held a quince? It's strange; - covered in a fuzz somewhere between peach skin and a spider web. And it's - hard as soft lumber. You'd be forgiven for thinking it's veneered Larch-wood. - But inhale the aroma and you'll instantly know you have something wonderful. - Its scent can fill a room for days. And all this before you've even cooked it. -'''.replaceAll('\n', ''); + static final String paragraph1 = ''' +Have you ever held a quince? It's strange; +covered in a fuzz somewhere between peach skin and a spider web. And it's +hard as soft lumber. You'd be forgiven for thinking it's veneered Larch-wood. +But inhale the aroma and you'll instantly know you have something wonderful. +Its scent can fill a room for days. And all this before you've even cooked it. +'''.replaceAll('\n', ' '); - static final String paragraph2 = '''Pomegranates on the other hand have become - almost ubiquitous. You can find its juice in any bodega, Walmart, and even some - gas stations. But at what cost? The pomegranate juice craze of the aughts made - "megafarmers" Lynda and Stewart Resnick billions. Unfortunately, it takes a lot - of water to make that much pomegranate juice. Water the Resnicks get from their - majority stake in the Kern Water Bank. How did one family come to hold control - over water meant for the whole central valley of California? The story will shock you. -'''.replaceAll('\n', ''); + static final String paragraph2 = ''' +Pomegranates on the other hand have become +almost ubiquitous. You can find its juice in any bodega, Walmart, and even some +gas stations. But at what cost? The pomegranate juice craze of the aughts made +"megafarmers" Lynda and Stewart Resnick billions. Unfortunately, it takes a lot +of water to make that much pomegranate juice. Water the Resnicks get from their +majority stake in the Kern Water Bank. How did one family come to hold control +over water meant for the whole central valley of California? The story will shock you. +'''.replaceAll('\n', ' '); @override Widget build(BuildContext context) { diff --git a/examples/flutter_gallery/test/example_code_parser_test.dart b/examples/flutter_gallery/test/example_code_parser_test.dart index 51b2e79611..e428064755 100644 --- a/examples/flutter_gallery/test/example_code_parser_test.dart +++ b/examples/flutter_gallery/test/example_code_parser_test.dart @@ -24,7 +24,8 @@ void main() { }); } -const String testCodeFile = '''// A fake test file +const String testCodeFile = ''' +// A fake test file // START test_0 test 0 0 test 0 1 diff --git a/packages/flutter/test/animation/animations_test.dart b/packages/flutter/test/animation/animations_test.dart index 8975aaafc3..dec27fb2d4 100644 --- a/packages/flutter/test/animation/animations_test.dart +++ b/packages/flutter/test/animation/animations_test.dart @@ -249,8 +249,8 @@ void main() { // RegExp matcher is required here due to flutter web and flutter mobile generating // slightly different floating point numbers // in Flutter web 0.0 sometimes just appears as 0. or 0 - RegExp( - r'''FlutterError + RegExp(r''' +FlutterError Invalid curve endpoint at \d+(\.\d*)?\. Curves must map 0\.0 to near zero and 1\.0 to near one but BogusCurve mapped \d+(\.\d*)? to \d+(\.\d*)?, which is near \d+(\.\d*)?\. diff --git a/packages/flutter/test/foundation/assertions_test.dart b/packages/flutter/test/foundation/assertions_test.dart index e0780fffb6..0c5f4aa874 100644 --- a/packages/flutter/test/foundation/assertions_test.dart +++ b/packages/flutter/test/foundation/assertions_test.dart @@ -355,7 +355,8 @@ void main() { test('Identifies user fault', () { // User fault because they called `new Text(null)` from their own code. - final StackTrace stack = StackTrace.fromString('''#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:42:39) + final StackTrace stack = StackTrace.fromString(''' +#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:42:39) #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:38:5) #2 new Text (package:flutter/src/widgets/text.dart:287:10) #3 _MyHomePageState.build (package:hello_flutter/main.dart:72:16) @@ -389,7 +390,8 @@ void main() { test('Identifies our fault', () { // Our fault because we should either have an assertion in `text_helper.dart` // or we should make sure not to pass bad values into new Text. - final StackTrace stack = StackTrace.fromString('''#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:42:39) + final StackTrace stack = StackTrace.fromString(''' +#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:42:39) #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:38:5) #2 new Text (package:flutter/src/widgets/text.dart:287:10) #3 new SomeWidgetUsingText (package:flutter/src/widgets/text_helper.dart:287:10) diff --git a/packages/flutter/test/widgets/scroll_physics_test.dart b/packages/flutter/test/widgets/scroll_physics_test.dart index 6d830c284e..8a88fb5b00 100644 --- a/packages/flutter/test/widgets/scroll_physics_test.dart +++ b/packages/flutter/test/widgets/scroll_physics_test.dart @@ -250,8 +250,8 @@ void main() { // in Flutter web 0.0 sometimes just appears as 0. or 0 expect( error.toStringDeep(), - matches(RegExp( - r'''FlutterError + matches(RegExp(r''' +FlutterError ClampingScrollPhysics\.applyBoundaryConditions\(\) was called redundantly\. The proposed new position\, 500(\.\d*)?, is exactly equal to the current diff --git a/packages/flutter_driver/lib/src/common/error.dart b/packages/flutter_driver/lib/src/common/error.dart index aae4e3f39b..5c427e34d7 100644 --- a/packages/flutter_driver/lib/src/common/error.dart +++ b/packages/flutter_driver/lib/src/common/error.dart @@ -23,11 +23,12 @@ class DriverError extends Error { String toString() { if (originalError == null) return 'DriverError: $message\n'; - return '''DriverError: $message + return ''' +DriverError: $message Original error: $originalError Original stack trace: $originalStackTrace - '''; +'''; } } diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart index fcf951611b..809db06adf 100644 --- a/packages/flutter_tools/lib/src/plugins.dart +++ b/packages/flutter_tools/lib/src/plugins.dart @@ -489,7 +489,8 @@ String _readFileContent(File file) { return file.existsSync() ? file.readAsStringSync() : null; } -const String _androidPluginRegistryTemplateOldEmbedding = '''package io.flutter.plugins; +const String _androidPluginRegistryTemplateOldEmbedding = ''' +package io.flutter.plugins; import io.flutter.plugin.common.PluginRegistry; {{#plugins}} @@ -520,7 +521,8 @@ public final class GeneratedPluginRegistrant { } '''; -const String _androidPluginRegistryTemplateNewEmbedding = '''package io.flutter.plugins; +const String _androidPluginRegistryTemplateNewEmbedding = ''' +package io.flutter.plugins; {{#androidX}} import androidx.annotation.Keep; @@ -646,7 +648,8 @@ Future _writeAndroidPluginRegistrant(FlutterProject project, List ); } -const String _objcPluginRegistryHeaderTemplate = '''// +const String _objcPluginRegistryHeaderTemplate = ''' +// // Generated file. Do not edit. // @@ -665,7 +668,8 @@ NS_ASSUME_NONNULL_END #endif /* GeneratedPluginRegistrant_h */ '''; -const String _objcPluginRegistryImplementationTemplate = '''// +const String _objcPluginRegistryImplementationTemplate = ''' +// // Generated file. Do not edit. // @@ -690,7 +694,8 @@ const String _objcPluginRegistryImplementationTemplate = '''// @end '''; -const String _swiftPluginRegistryTemplate = '''// +const String _swiftPluginRegistryTemplate = ''' +// // Generated file. Do not edit. // @@ -736,7 +741,8 @@ Depends on all your plugins, and provides a function to register them. end '''; -const String _dartPluginRegistryTemplate = '''// +const String _dartPluginRegistryTemplate = ''' +// // Generated file. Do not edit. // @@ -757,7 +763,8 @@ void registerPlugins(PluginRegistry registry) { } '''; -const String _cppPluginRegistryHeaderTemplate = '''// +const String _cppPluginRegistryHeaderTemplate = ''' +// // Generated file. Do not edit. // @@ -772,7 +779,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry); #endif // GENERATED_PLUGIN_REGISTRANT_ '''; -const String _cppPluginRegistryImplementationTemplate = '''// +const String _cppPluginRegistryImplementationTemplate = ''' +// // Generated file. Do not edit. // diff --git a/packages/flutter_tools/lib/src/reporting/github_template.dart b/packages/flutter_tools/lib/src/reporting/github_template.dart index ff35e3b268..f607a5b141 100644 --- a/packages/flutter_tools/lib/src/reporting/github_template.dart +++ b/packages/flutter_tools/lib/src/reporting/github_template.dart @@ -40,7 +40,8 @@ class GitHubTemplateCreator { String doctorText ) async { final String title = '[tool_crash] $errorString'; - final String body = '''## Command + final String body = ''' +## Command ``` $command ``` diff --git a/packages/flutter_tools/test/commands.shard/permeable/analyze_once_test.dart b/packages/flutter_tools/test/commands.shard/permeable/analyze_once_test.dart index be289e0b67..bdf7884d3e 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/analyze_once_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/analyze_once_test.dart @@ -41,7 +41,8 @@ void main() { } else { flutterRootUri.write(canonicalizedFlutterRootPath); } - final String dotPackagesSrc = '''# Generated + final String dotPackagesSrc = ''' +# Generated flutter:$flutterRootUri/packages/flutter/lib/ sky_engine:$flutterRootUri/bin/cache/pkg/sky_engine/lib/ flutter_project:lib/ @@ -357,7 +358,8 @@ class _MyHomePageState extends State { } '''; -const String pubspecYamlSrc = r'''name: flutter_project +const String pubspecYamlSrc = r''' +name: flutter_project environment: sdk: ">=2.1.0 <3.0.0" diff --git a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart index ddd01d7d8b..d80fdbf759 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart @@ -35,7 +35,8 @@ final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(cons final Map noColorTerminalOverride = { Platform: _kNoColorTerminalPlatform, }; -const String samplesIndexJson = '''[ +const String samplesIndexJson = ''' +[ { "id": "sample1" }, { "id": "sample2" } ]'''; diff --git a/packages/flutter_tools/test/general.shard/android/gradle_test.dart b/packages/flutter_tools/test/general.shard/android/gradle_test.dart index f3a844af94..ff72d4fc3b 100644 --- a/packages/flutter_tools/test/general.shard/android/gradle_test.dart +++ b/packages/flutter_tools/test/general.shard/android/gradle_test.dart @@ -1669,8 +1669,8 @@ plugin1=${plugin1.path} fileSystem.file('out/android_arm/flutter_embedding_release.pom') ..createSync(recursive: true) - ..writeAsStringSync( -''' + ..writeAsStringSync(''' + 1.0.0-73fd6b049a80bcea2db1f26c7cee434907cd188b @@ -1761,8 +1761,8 @@ plugin1=${plugin1.path} fileSystem.file('out/android_arm/flutter_embedding_release.pom') ..createSync(recursive: true) - ..writeAsStringSync( -''' + ..writeAsStringSync(''' + 1.0.0-73fd6b049a80bcea2db1f26c7cee434907cd188b diff --git a/packages/flutter_tools/test/general.shard/application_package_test.dart b/packages/flutter_tools/test/general.shard/application_package_test.dart index 307c1f5636..8e159d3181 100644 --- a/packages/flutter_tools/test/general.shard/application_package_test.dart +++ b/packages/flutter_tools/test/general.shard/application_package_test.dart @@ -396,8 +396,8 @@ void main() { }); } -const String _aaptDataWithExplicitEnabledAndMainLauncherActivity = -'''N: android=http://schemas.android.com/apk/res/android +const String _aaptDataWithExplicitEnabledAndMainLauncherActivity = ''' +N: android=http://schemas.android.com/apk/res/android E: manifest (line=7) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1") @@ -437,8 +437,8 @@ const String _aaptDataWithExplicitEnabledAndMainLauncherActivity = A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")'''; -const String _aaptDataWithDefaultEnabledAndMainLauncherActivity = -'''N: android=http://schemas.android.com/apk/res/android +const String _aaptDataWithDefaultEnabledAndMainLauncherActivity = ''' +N: android=http://schemas.android.com/apk/res/android E: manifest (line=7) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1") @@ -477,8 +477,8 @@ const String _aaptDataWithDefaultEnabledAndMainLauncherActivity = A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")'''; -const String _aaptDataWithNoEnabledActivity = -'''N: android=http://schemas.android.com/apk/res/android +const String _aaptDataWithNoEnabledActivity = ''' +N: android=http://schemas.android.com/apk/res/android E: manifest (line=7) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1") @@ -507,8 +507,8 @@ const String _aaptDataWithNoEnabledActivity = E: category (line=45) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")'''; -const String _aaptDataWithNoMainActivity = -'''N: android=http://schemas.android.com/apk/res/android +const String _aaptDataWithNoMainActivity = ''' +N: android=http://schemas.android.com/apk/res/android E: manifest (line=7) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1") @@ -535,8 +535,8 @@ const String _aaptDataWithNoMainActivity = E: category (line=43) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")'''; -const String _aaptDataWithNoLauncherActivity = -'''N: android=http://schemas.android.com/apk/res/android +const String _aaptDataWithNoLauncherActivity = ''' +N: android=http://schemas.android.com/apk/res/android E: manifest (line=7) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="0.0.1" (Raw: "0.0.1") @@ -563,8 +563,8 @@ const String _aaptDataWithNoLauncherActivity = E: action (line=43) A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")'''; -const String _aaptDataWithLauncherAndDefaultActivity = -'''N: android=http://schemas.android.com/apk/res/android +const String _aaptDataWithLauncherAndDefaultActivity = ''' +N: android=http://schemas.android.com/apk/res/android N: dist=http://schemas.android.com/apk/distribution E: manifest (line=7) A: android:versionCode(0x0101021b)=(type 0x10)0x1 @@ -601,8 +601,8 @@ const String _aaptDataWithLauncherAndDefaultActivity = A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") '''; -const String _aaptDataWithDistNamespace = -'''N: android=http://schemas.android.com/apk/res/android +const String _aaptDataWithDistNamespace = ''' +N: android=http://schemas.android.com/apk/res/android N: dist=http://schemas.android.com/apk/distribution E: manifest (line=7) A: android:versionCode(0x0101021b)=(type 0x10)0x1 diff --git a/packages/flutter_tools/test/general.shard/github_template_test.dart b/packages/flutter_tools/test/general.shard/github_template_test.dart index 8d5efde877..f41d8dd014 100644 --- a/packages/flutter_tools/test/general.shard/github_template_test.dart +++ b/packages/flutter_tools/test/general.shard/github_template_test.dart @@ -107,7 +107,8 @@ device_info=/fake/pub.dartlang.org/pub.dartlang.org/device_info-0.4.1+4/ final String actualURL = await creator.toolCrashIssueTemplateGitHubURL(command, errorString, exception, stackTrace, doctorText); final String actualBody = Uri.parse(actualURL).queryParameters['body']; - const String expectedBody = '''## Command + const String expectedBody = ''' +## Command ``` flutter test ``` diff --git a/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart b/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart index e2a86706d3..c3cb71c4fc 100644 --- a/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart +++ b/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart @@ -79,7 +79,8 @@ void main() { const String addr = '192.168.1.1'; runner = SshCommandRunner.withProcessManager(mockProcessManager, address: addr); - when(mockProcessResult.stdout).thenReturn('''this + when(mockProcessResult.stdout).thenReturn(''' + this has four lines''');