Unverified Commit 7d7ac7c3 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

start multiline strings with newline (#50825)

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