Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b953c3e5
Unverified
Commit
b953c3e5
authored
Feb 07, 2020
by
Alexandre Ardhuin
Committed by
GitHub
Feb 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use raw strings to avoid escaping (#50322)
parent
8735ab1e
Changes
28
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
171 additions
and
157 deletions
+171
-157
analyze_test.dart
dev/bots/test/analyze_test.dart
+3
-3
gradle_migrate_settings_test.dart
dev/devicelab/bin/tasks/gradle_migrate_settings_test.dart
+3
-3
utils.dart
dev/devicelab/lib/framework/utils.dart
+1
-1
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+1
-1
snippets_test.dart
dev/snippets/test/snippets_test.dart
+10
-10
gen_l10n_test.dart
dev/tools/test/localization/gen_l10n_test.dart
+53
-40
vitool.dart
dev/tools/vitool/lib/vitool.dart
+2
-2
vitool_test.dart
dev/tools/vitool/test/vitool_test.dart
+1
-1
text_form_field_demo.dart
...utter_gallery/lib/demo/material/text_form_field_demo.dart
+1
-1
diagnostics.dart
packages/flutter/lib/src/foundation/diagnostics.dart
+1
-1
error_reporting_test.dart
packages/flutter/test/foundation/error_reporting_test.dart
+50
-50
text_test.dart
packages/flutter/test/widgets/text_test.dart
+2
-2
web_driver.dart
packages/flutter_driver/lib/src/driver/web_driver.dart
+8
-7
_extension_web.dart
...ages/flutter_driver/lib/src/extension/_extension_web.dart
+2
-2
web_extension_test.dart
...flutter_driver/test/src/web_tests/web_extension_test.dart
+1
-1
file_system.dart
packages/flutter_tools/lib/src/base/file_system.dart
+1
-1
project.dart
packages/flutter_tools/lib/src/project.dart
+1
-1
vscode.dart
packages/flutter_tools/lib/src/vscode/vscode.dart
+2
-2
web_device.dart
packages/flutter_tools/lib/src/web/web_device.dart
+1
-1
analyze_once_test.dart
...ools/test/commands.shard/permeable/analyze_once_test.dart
+1
-1
gradle_errors_test.dart
..._tools/test/general.shard/android/gradle_errors_test.dart
+12
-12
gradle_test.dart
...flutter_tools/test/general.shard/android/gradle_test.dart
+3
-3
file_system_test.dart
...utter_tools/test/general.shard/base/file_system_test.dart
+3
-3
logger_test.dart
...es/flutter_tools/test/general.shard/base/logger_test.dart
+1
-1
compile_incremental_test.dart
...er_tools/test/general.shard/compile_incremental_test.dart
+3
-3
project_test.dart
packages/flutter_tools/test/general.shard/project_test.dart
+2
-2
devices_test.dart
...es/flutter_tools/test/general.shard/web/devices_test.dart
+1
-1
fuchsia_remote_connection.dart
...ote_debug_protocol/lib/src/fuchsia_remote_connection.dart
+1
-1
No files found.
dev/bots/test/analyze_test.dart
View file @
b953c3e5
...
...
@@ -49,7 +49,7 @@ void main() {
'test/analyze-test-input/root/packages/foo/deprecation.dart:41: Deprecation notice does not match required pattern.
\n
'
'test/analyze-test-input/root/packages/foo/deprecation.dart:48: End of deprecation notice does not match required pattern.
\n
'
'test/analyze-test-input/root/packages/foo/deprecation.dart:51: Unexpected deprecation notice indent.
\n
'
.
replaceAll
(
'/'
,
Platform
.
isWindows
?
'
\
\
'
:
'/'
)
.
replaceAll
(
'/'
,
Platform
.
isWindows
?
r'
\'
:
'/'
)
)
+
'See: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
\n
'
...
...
@@ -65,7 +65,7 @@ void main() {
(
'The following 1 file does not have the right license header:
\n
'
'test/analyze-test-input/root/packages/foo/foo.dart
\n
'
.
replaceAll
(
'/'
,
Platform
.
isWindows
?
'
\
\
'
:
'/'
)
.
replaceAll
(
'/'
,
Platform
.
isWindows
?
r'
\'
:
'/'
)
)
+
'The expected license header is:
\n
'
...
...
@@ -85,7 +85,7 @@ void main() {
(
'test/analyze-test-input/root/packages/foo/spaces.txt:5: trailing U+0020 space character
\n
'
'test/analyze-test-input/root/packages/foo/spaces.txt:9: trailing blank line
\n
'
.
replaceAll
(
'/'
,
Platform
.
isWindows
?
'
\
\
'
:
'/'
)
.
replaceAll
(
'/'
,
Platform
.
isWindows
?
r'
\'
:
'/'
)
)
+
'━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
\n
'
...
...
dev/devicelab/bin/tasks/gradle_migrate_settings_test.dart
View file @
b953c3e5
...
...
@@ -73,7 +73,7 @@ Future<void> main() async {
section
(
'Override settings.gradle V2'
);
const
String
deprecatedFileContentV2
=
'''
const
String
deprecatedFileContentV2
=
r
''
'
include '
:
app
'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
...
...
@@ -86,8 +86,8 @@ if (pluginsFile.exists()) {
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('
android
').toFile()
include ":
\
$name
"
project(":
\
$name
").projectDir = pluginDirectory
include ":
$name
"
project(":
$name
").projectDir = pluginDirectory
}
'''
;
settingsGradle
.
writeAsStringSync
(
deprecatedFileContentV2
,
flush:
true
);
...
...
dev/devicelab/lib/framework/utils.dart
View file @
b953c3e5
...
...
@@ -588,7 +588,7 @@ String extractCloudAuthTokenArg(List<String> rawArgs) {
final
RegExp
_obsRegExp
=
RegExp
(
'An Observatory debugger .* is available at: '
);
final
RegExp
_obsPortRegExp
=
RegExp
(
'(
\\
S+:(
\\
d+)/
\\
S*)
\
$
'
);
final
RegExp
_obsPortRegExp
=
RegExp
(
r'(\S+:(\d+)/\S*)
$'
);
final
RegExp
_obsUriRegExp
=
RegExp
(
r'((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)'
);
/// Tries to extract a port from the string.
...
...
dev/devicelab/lib/tasks/perf_tests.dart
View file @
b953c3e5
...
...
@@ -777,7 +777,7 @@ class ListStatistics {
class
_UnzipListEntry
{
factory
_UnzipListEntry
.
fromLine
(
String
line
)
{
final
List
<
String
>
data
=
line
.
trim
().
split
(
RegExp
(
'
\
\
s+'
));
final
List
<
String
>
data
=
line
.
trim
().
split
(
RegExp
(
r'
\s+'
));
assert
(
data
.
length
==
8
);
return
_UnzipListEntry
.
_
(
uncompressedSize:
int
.
parse
(
data
[
0
]),
...
...
dev/snippets/test/snippets_test.dart
View file @
b953c3e5
...
...
@@ -64,7 +64,7 @@ main() {
test
(
'generates application snippets'
,
()
async
{
final
File
inputFile
=
File
(
path
.
join
(
tmpDir
.
absolute
.
path
,
'snippet_in.txt'
))
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'''
..
writeAsStringSync
(
r
''
'
A description of the snippet.
On several lines.
...
...
@@ -75,7 +75,7 @@ const String name = 'snippet';
```dart
void main() {
print('
The
actual
\
$name
.
');
print('
The
actual
$name
.
');
}
```
'''
);
...
...
@@ -93,7 +93,7 @@ void main() {
);
expect
(
html
,
contains
(
'<div>HTML Bits</div>'
));
expect
(
html
,
contains
(
'<div>More HTML Bits</div>'
));
expect
(
html
,
contains
(
'print('The actual
\
$name
.');'
));
expect
(
html
,
contains
(
r'print('The actual
$name.');'
));
expect
(
html
,
contains
(
'A description of the snippet.
\n
'
));
expect
(
html
,
...
...
@@ -112,14 +112,14 @@ void main() {
test
(
'generates sample snippets'
,
()
async
{
final
File
inputFile
=
File
(
path
.
join
(
tmpDir
.
absolute
.
path
,
'snippet_in.txt'
))
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'''
..
writeAsStringSync
(
r
''
'
A description of the snippet.
On several lines.
```code
void main() {
print('
The
actual
\
$name
.
');
print('
The
actual
$name
.
');
}
```
'''
);
...
...
@@ -131,7 +131,7 @@ void main() {
);
expect
(
html
,
contains
(
'<div>HTML Bits</div>'
));
expect
(
html
,
contains
(
'<div>More HTML Bits</div>'
));
expect
(
html
,
contains
(
' print('The actual
\
$name
.');'
));
expect
(
html
,
contains
(
r' print('The actual
$name.');'
));
expect
(
html
,
contains
(
'<div class="snippet-description">{@end-inject-html}A description of the snippet.
\n\n
'
'On several lines.{@inject-html}</div>
\n
'
));
expect
(
html
,
contains
(
'main() {'
));
...
...
@@ -140,14 +140,14 @@ void main() {
test
(
'generates dartpad snippets'
,
()
async
{
final
File
inputFile
=
File
(
path
.
join
(
tmpDir
.
absolute
.
path
,
'snippet_in.txt'
))
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'''
..
writeAsStringSync
(
r
''
'
A description of the snippet.
On several lines.
```code
void main() {
print('
The
actual
\
$name
.
');
print('
The
actual
$name
.
');
}
```
'''
);
...
...
@@ -167,14 +167,14 @@ void main() {
test
(
'generates snippet application metadata'
,
()
async
{
final
File
inputFile
=
File
(
path
.
join
(
tmpDir
.
absolute
.
path
,
'snippet_in.txt'
))
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'''
..
writeAsStringSync
(
r
''
'
A description of the snippet.
On several lines.
```code
void main() {
print('
The
actual
\
$name
.
');
print('
The
actual
$name
.
');
}
```
'''
);
...
...
dev/tools/test/localization/gen_l10n_test.dart
View file @
b953c3e5
This diff is collapsed.
Click to expand it.
dev/tools/vitool/lib/vitool.dart
View file @
b953c3e5
...
...
@@ -460,7 +460,7 @@ class _Transform {
}
const
String
_transformCommandAtom
=
' *([^(]+)
\\
(([^)]*)
\
\
)'
;
const
String
_transformCommandAtom
=
r' *([^(]+)\(([^)]*)
\)'
;
final
RegExp
_transformValidator
=
RegExp
(
'^(
$_transformCommandAtom
)*
\$
'
);
final
RegExp
_transformCommand
=
RegExp
(
_transformCommandAtom
);
...
...
@@ -522,7 +522,7 @@ Matrix3 _matrix(double a, double b, double c, double d, double e, double f) {
// Matches a pixels expression e.g "14px".
// First group is just the number.
final
RegExp
_pixelsExp
=
RegExp
(
'^([0-9]+)px
\
$
'
);
final
RegExp
_pixelsExp
=
RegExp
(
r'^([0-9]+)px
$'
);
/// Parses a pixel expression, e.g "14px", and returns the number.
/// Throws an [ArgumentError] if the given string doesn't match the pattern.
...
...
dev/tools/vitool/test/vitool_test.dart
View file @
b953c3e5
...
...
@@ -559,7 +559,7 @@ void main() {
),
]);
expect
(
animation
.
toDart
(
'_AnimatedIconData'
,
'_
\
$data1
'
),
expect
(
animation
.
toDart
(
'_AnimatedIconData'
,
r'_
$data1'
),
'const _AnimatedIconData _
\
$data1
= const _AnimatedIconData(
\n
'
' const Size(48.0, 48.0),
\n
'
' const <_PathFrames>[
\n
'
...
...
examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart
View file @
b953c3e5
...
...
@@ -250,7 +250,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
decoration:
const
InputDecoration
(
border:
OutlineInputBorder
(),
labelText:
'Salary'
,
prefixText:
'
\
$
'
,
prefixText:
r'
$'
,
suffixText:
'USD'
,
suffixStyle:
TextStyle
(
color:
Colors
.
green
),
),
...
...
packages/flutter/lib/src/foundation/diagnostics.dart
View file @
b953c3e5
...
...
@@ -1819,7 +1819,7 @@ class StringProperty extends DiagnosticsProperty<String> {
// Escape linebreaks in multiline strings to avoid confusing output when
// the parent of this node is trying to display all properties on the same
// line.
text
=
text
.
replaceAll
(
'
\n
'
,
'
\
\
n'
);
text
=
text
.
replaceAll
(
'
\n
'
,
r'
\n'
);
}
if
(
quoted
&&
text
!=
null
)
{
...
...
packages/flutter/test/foundation/error_reporting_test.dart
View file @
b953c3e5
This diff is collapsed.
Click to expand it.
packages/flutter/test/widgets/text_test.dart
View file @
b953c3e5
...
...
@@ -165,7 +165,7 @@ void main() {
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
await
tester
.
pumpWidget
(
const
Text
(
'
\$\
$
'
,
r'$
$'
,
semanticsLabel:
'Double dollars'
,
textDirection:
TextDirection
.
ltr
,
)
...
...
@@ -191,7 +191,7 @@ void main() {
await
tester
.
pumpWidget
(
const
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Text
(
'
\$\
$
'
,
semanticsLabel:
'Double dollars'
)),
child:
Text
(
r'$
$'
,
semanticsLabel:
'Double dollars'
)),
);
expect
(
...
...
packages/flutter_driver/lib/src/driver/web_driver.dart
View file @
b953c3e5
...
...
@@ -212,17 +212,18 @@ class FlutterWebConnection {
}
try
{
result
=
await
waitFor
<
dynamic
>(
()
=>
_driver
.
execute
(
'r'
'eturn
\
$flutterDriverResult
'
,
<
String
>[]),
result
=
await
waitFor
<
dynamic
>(
()
=>
_driver
.
execute
(
r'return
$flutterDriverResult'
,
<
String
>[]),
matcher:
isNotNull
,
timeout:
duration
??
const
Duration
(
days:
30
));
timeout:
duration
??
const
Duration
(
days:
30
),
);
}
catch
(
_
)
{
// Returns null if exception thrown.
return
null
;
}
finally
{
// Resets the result.
_driver
.
execute
(
'''
\
$flutterDriverResult
= null
_driver
.
execute
(
r
''
'
$flutterDriverResult
= null
'''
,
<
void
>[]);
}
return
result
;
...
...
@@ -243,7 +244,7 @@ class FlutterWebConnection {
/// Waits until extension is installed.
Future
<
void
>
waitUntilExtensionInstalled
(
sync_io
.
WebDriver
driver
,
Duration
timeout
)
async
{
await
waitFor
<
void
>(()
=>
driver
.
execute
(
'return typeof(window.
\
$flutterDriver
)'
,
<
String
>[]),
driver
.
execute
(
r'return typeof(window.
$flutterDriver)'
,
<
String
>[]),
matcher:
'function'
,
timeout:
timeout
??
const
Duration
(
days:
365
));
}
...
...
packages/flutter_driver/lib/src/extension/_extension_web.dart
View file @
b953c3e5
...
...
@@ -19,12 +19,12 @@ import 'dart:js_util' as js_util;
///
/// * [_extension_io.dart], which has the dart:io implementation
void
registerWebServiceExtension
(
Future
<
Map
<
String
,
dynamic
>>
Function
(
Map
<
String
,
String
>)
call
)
{
js_util
.
setProperty
(
html
.
window
,
'
\
$flutterDriver
'
,
allowInterop
((
dynamic
message
)
async
{
js_util
.
setProperty
(
html
.
window
,
r'
$flutterDriver'
,
allowInterop
((
dynamic
message
)
async
{
// ignore: undefined_function, undefined_identifier
final
Map
<
String
,
String
>
params
=
Map
<
String
,
String
>.
from
(
jsonDecode
(
message
as
String
)
as
Map
<
String
,
dynamic
>);
final
Map
<
String
,
dynamic
>
result
=
Map
<
String
,
dynamic
>.
from
(
await
call
(
params
));
context
[
'
\
$flutterDriverResult
'
]
=
json
.
encode
(
result
);
context
[
r'
$flutterDriverResult'
]
=
json
.
encode
(
result
);
}));
}
packages/flutter_driver/test/src/web_tests/web_extension_test.dart
View file @
b953c3e5
...
...
@@ -20,7 +20,7 @@ void main() {
test
(
'web_extension should register a function'
,
()
{
expect
(()
=>
registerWebServiceExtension
(
call
),
returnsNormally
);
expect
(
js
.
context
.
hasProperty
(
'
\
$flutterDriver
'
),
true
);
expect
(
js
.
context
.
hasProperty
(
r'
$flutterDriver'
),
true
);
});
});
}
packages/flutter_tools/lib/src/base/file_system.dart
View file @
b953c3e5
...
...
@@ -114,7 +114,7 @@ class FileSystemUtils {
///
/// On Windows it replaces all '\' with '\\'. On other platforms, it returns the
/// path unchanged.
String
escapePath
(
String
path
)
=>
_platform
.
isWindows
?
path
.
replaceAll
(
'
\\
'
,
'
\\
\\
'
)
:
path
;
String
escapePath
(
String
path
)
=>
_platform
.
isWindows
?
path
.
replaceAll
(
r'\'
,
r'
\\'
)
:
path
;
/// Returns true if the file system [entity] has not been modified since the
/// latest modification to [referenceFile].
...
...
packages/flutter_tools/lib/src/project.dart
View file @
b953c3e5
...
...
@@ -409,7 +409,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
} on FileNotFoundException {
// iOS tooling not found; likely not running OSX; let [fromPlist] be null
}
if (fromPlist != null && !fromPlist.contains(
'
\
$
')) {
if (fromPlist != null && !fromPlist.contains(
r'
$
')) {
// Info.plist has no build variables in product bundle ID.
return fromPlist;
}
...
...
packages/flutter_tools/lib/src/vscode/vscode.dart
View file @
b953c3e5
...
...
@@ -163,7 +163,7 @@ class VsCode {
if
(
localAppData
!=
null
)
{
searchLocations
.
add
(
_VsCodeInstallLocation
(
globals
.
fs
.
path
.
join
(
localAppData
,
'Programs
\
\
Microsoft VS Code'
),
globals
.
fs
.
path
.
join
(
localAppData
,
r'Programs
\Microsoft VS Code'
),
'.vscode'
,
));
}
...
...
@@ -179,7 +179,7 @@ class VsCode {
));
if
(
localAppData
!=
null
)
{
searchLocations
.
add
(
_VsCodeInstallLocation
(
globals
.
fs
.
path
.
join
(
localAppData
,
'Programs
\
\
Microsoft VS Code Insiders'
),
globals
.
fs
.
path
.
join
(
localAppData
,
r'Programs
\Microsoft VS Code Insiders'
),
'.vscode-insiders'
,
isInsiders:
true
,
));
...
...
packages/flutter_tools/lib/src/web/web_device.dart
View file @
b953c3e5
...
...
@@ -100,7 +100,7 @@ class ChromeDevice extends Device {
String
version
=
'unknown'
;
if
(
globals
.
platform
.
isWindows
)
{
final
ProcessResult
result
=
await
globals
.
processManager
.
run
(<
String
>[
r'reg'
,
'query'
,
'HKEY_CURRENT_USER
\\
Software
\\
Google
\\
Chrome
\
\
BLBeacon'
,
'/v'
,
'version'
,
r'reg'
,
'query'
,
r'HKEY_CURRENT_USER\Software\Google\Chrome
\BLBeacon'
,
'/v'
,
'version'
,
]);
if
(
result
.
exitCode
==
0
)
{
final
List
<
String
>
parts
=
(
result
.
stdout
as
String
).
split
(
RegExp
(
r'\s+'
));
...
...
packages/flutter_tools/test/commands.shard/permeable/analyze_once_test.dart
View file @
b953c3e5
...
...
@@ -37,7 +37,7 @@ void main() {
if
(
globals
.
platform
.
isWindows
)
{
flutterRootUri
..
write
(
'/'
)
..
write
(
canonicalizedFlutterRootPath
.
replaceAll
(
'
\
\
'
,
'/'
));
..
write
(
canonicalizedFlutterRootPath
.
replaceAll
(
r'
\'
,
'/'
));
}
else
{
flutterRootUri
.
write
(
canonicalizedFlutterRootPath
);
}
...
...
packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart
View file @
b953c3e5
...
...
@@ -40,15 +40,15 @@ void main() {
group
(
'network errors'
,
()
{
testUsingContext
(
'retries if gradle fails while downloading'
,
()
async
{
const
String
errorMessage
=
'''
const
String
errorMessage
=
r
''
'
Exception in thread "main" java.io.FileNotFoundException: https://downloads.gradle.org/distributions/gradle-4.1.1-all.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:48)
at org.gradle.wrapper.Install
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
$
1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
...
...
@@ -66,7 +66,7 @@ at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)''';
});
testUsingContext
(
'retries if gradle fails downloading with proxy error'
,
()
async
{
const
String
errorMessage
=
'''
const
String
errorMessage
=
r
''
'
Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2124)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
...
...
@@ -75,8 +75,8 @@ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:48)
at org.gradle.wrapper.Install
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
$
1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
...
...
@@ -113,7 +113,7 @@ Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached
});
testUsingContext
(
'retries if remote host closes connection'
,
()
async
{
const
String
errorMessage
=
'''
const
String
errorMessage
=
r
''
'
Downloading https://services.gradle.org/distributions/gradle-5.6.2-all.zip
Exception in thread "main" javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:994)
...
...
@@ -129,8 +129,8 @@ Exception in thread "main" javax.net.ssl.SSLHandshakeException: Remote host clos
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:48)
at org.gradle.wrapper.Install
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
$
1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
...
...
@@ -175,7 +175,7 @@ Exception in thread "main" java.io.FileNotFoundException: https://downloads.grad
});
testUsingContext
(
'retries if the connection is reset'
,
()
async
{
const
String
errorMessage
=
'''
const
String
errorMessage
=
r
''
'
Downloading https://services.gradle.org/distributions/gradle-5.6.2-all.zip
Exception in thread "main" java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
...
...
@@ -194,8 +194,8 @@ Exception in thread "main" java.net.SocketException: Connection reset
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
\
$
1.call(Install.java:48)
at org.gradle.wrapper.Install
$
1.call(Install.java:61)
at org.gradle.wrapper.Install
$
1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
b953c3e5
...
...
@@ -457,7 +457,7 @@ void main() {
});
testUsingContext
(
'create settings_aar.gradle when current settings.gradle loads plugins'
,
()
{
const
String
currentSettingsGradle
=
'''
const
String
currentSettingsGradle
=
r
''
'
include '
:
app
'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
...
...
@@ -470,8 +470,8 @@ if (pluginsFile.exists()) {
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('
android
').toFile()
include ":
\
$name
"
project(":
\
$name
").projectDir = pluginDirectory
include ":
$name
"
project(":
$name
").projectDir = pluginDirectory
}
'''
;
...
...
packages/flutter_tools/test/general.shard/base/file_system_test.dart
View file @
b953c3e5
...
...
@@ -105,8 +105,8 @@ void main() {
fileSystem:
fileSystem
,
platform:
FakePlatform
(
operatingSystem:
'windows'
),
);
expect
(
fsUtils
.
escapePath
(
'C:
\\
foo
\\
bar
\\
cool.dart'
),
'C:
\\\\
foo
\\\\
bar
\\
\\
cool.dart'
);
expect
(
fsUtils
.
escapePath
(
'foo
\\
bar
\\
cool.dart'
),
'foo
\\\\
bar
\\
\\
cool.dart'
);
expect
(
fsUtils
.
escapePath
(
r'C:\foo\bar\cool.dart'
),
r'C:\\foo\\bar
\\cool.dart'
);
expect
(
fsUtils
.
escapePath
(
r'foo\bar\cool.dart'
),
r'foo\\bar
\\cool.dart'
);
expect
(
fsUtils
.
escapePath
(
'C:/foo/bar/cool.dart'
),
'C:/foo/bar/cool.dart'
);
});
...
...
@@ -118,7 +118,7 @@ void main() {
);
expect
(
fsUtils
.
escapePath
(
'/foo/bar/cool.dart'
),
'/foo/bar/cool.dart'
);
expect
(
fsUtils
.
escapePath
(
'foo/bar/cool.dart'
),
'foo/bar/cool.dart'
);
expect
(
fsUtils
.
escapePath
(
'foo
\\
cool.dart'
),
'foo
\
\
cool.dart'
);
expect
(
fsUtils
.
escapePath
(
r'foo\cool.dart'
),
r'foo
\cool.dart'
);
});
});
}
packages/flutter_tools/test/general.shard/base/logger_test.dart
View file @
b953c3e5
...
...
@@ -282,7 +282,7 @@ void main() {
);
logger
.
printStatus
(
'Rude Interrupting Cow'
);
status
.
stop
();
final
String
a
=
currentPlatform
().
isWindows
?
'
\
\
'
:
'⣽'
;
final
String
a
=
currentPlatform
().
isWindows
?
r'
\'
:
'⣽'
;
final
String
b
=
currentPlatform
().
isWindows
?
'|'
:
'⣻'
;
expect
(
...
...
packages/flutter_tools/test/general.shard/compile_incremental_test.dart
View file @
b953c3e5
...
...
@@ -126,13 +126,13 @@ void main() {
await
_recompile
(
streamController
,
generator
,
mockFrontendServerStdIn
,
'result abc
\n
line1
\n
line2
\n
abc
\n
abc /path/to/main.dart.dill 0
\n
'
);
await
_accept
(
streamController
,
generator
,
mockFrontendServerStdIn
,
'^accept
\\
n
\
$
'
);
await
_accept
(
streamController
,
generator
,
mockFrontendServerStdIn
,
r'^accept\n
$'
);
await
_recompile
(
streamController
,
generator
,
mockFrontendServerStdIn
,
'result abc
\n
line1
\n
line2
\n
abc
\n
abc /path/to/main.dart.dill 0
\n
'
);
// No sources returned from reject command.
await
_reject
(
streamController
,
generator
,
mockFrontendServerStdIn
,
'result abc
\n
abc
\n
'
,
'^reject
\\
n
\
$
'
);
r'^reject\n
$'
);
verifyNoMoreInteractions
(
mockFrontendServerStdIn
);
expect
(
mockFrontendServerStdIn
.
getAndClear
(),
isEmpty
);
expect
(
testLogger
.
errorText
,
equals
(
...
...
@@ -193,7 +193,7 @@ Future<void> _recompile(
);
expect
(
output
.
outputFilename
,
equals
(
'/path/to/main.dart.dill'
));
final
String
commands
=
mockFrontendServerStdIn
.
getAndClear
();
final
RegExp
re
=
RegExp
(
'^recompile (.*)
\\
n/path/to/main.dart
\\
n(.*)
\\
n
\
$
'
);
final
RegExp
re
=
RegExp
(
r'^recompile (.*)\n/path/to/main.dart\n(.*)\n
$'
);
expect
(
commands
,
matches
(
re
));
final
Match
match
=
re
.
firstMatch
(
commands
);
expect
(
match
[
1
]
==
match
[
2
],
isTrue
);
...
...
packages/flutter_tools/test/general.shard/project_test.dart
View file @
b953c3e5
...
...
@@ -388,7 +388,7 @@ apply plugin: 'kotlin-android'
});
}
);
when
(
mockPlistUtils
.
getValueFromFile
(
any
,
any
)).
thenReturn
(
'
\
$
(PRODUCT_BUNDLE_IDENTIFIER)'
);
when
(
mockPlistUtils
.
getValueFromFile
(
any
,
any
)).
thenReturn
(
r'
$(PRODUCT_BUNDLE_IDENTIFIER)'
);
expect
(
await
project
.
ios
.
productBundleIdentifier
,
'io.flutter.someProject'
);
});
...
...
@@ -403,7 +403,7 @@ apply plugin: 'kotlin-android'
});
}
);
when
(
mockPlistUtils
.
getValueFromFile
(
any
,
any
)).
thenReturn
(
'
\$
(PRODUCT_BUNDLE_IDENTIFIER).
\
$
(SUFFIX)'
);
when
(
mockPlistUtils
.
getValueFromFile
(
any
,
any
)).
thenReturn
(
r'$(PRODUCT_BUNDLE_IDENTIFIER).
$(SUFFIX)'
);
expect
(
await
project
.
ios
.
productBundleIdentifier
,
'io.flutter.someProject.suffix'
);
});
testWithMocks
(
'empty surrounded by quotes'
,
()
async
{
...
...
packages/flutter_tools/test/general.shard/web/devices_test.dart
View file @
b953c3e5
...
...
@@ -117,7 +117,7 @@ void main() {
when
(
mockProcessManager
.
run
(<
String
>[
'reg'
,
'query'
,
'HKEY_CURRENT_USER
\\
Software
\\
Google
\\
Chrome
\
\
BLBeacon'
,
r'HKEY_CURRENT_USER\Software\Google\Chrome
\BLBeacon'
,
'/v'
,
'version'
,
])).
thenAnswer
((
Invocation
invocation
)
async
{
...
...
packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
View file @
b953c3e5
...
...
@@ -196,7 +196,7 @@ class FuchsiaRemoteConnection {
sshConfigPath
??=
Platform
.
environment
[
'FUCHSIA_SSH_CONFIG'
];
if
(
address
==
null
)
{
throw
FuchsiaRemoteConnectionError
(
'No address supplied, and
\
$FUCHSIA_DEVICE_URL
not found.'
);
r'No address supplied, and
$FUCHSIA_DEVICE_URL not found.'
);
}
const
String
interfaceDelimiter
=
'%'
;
if
(
address
.
contains
(
interfaceDelimiter
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment