unnecessary escapes fixes (#50178)
* unnecessary escapes fixes * replace some strings with raw strings * update regexp * address review comments
This commit is contained in:
committed by
GitHub
parent
b8199abd15
commit
5c28e3eeea
@@ -128,7 +128,7 @@ void main() {
|
||||
// If the next line fails, your device may not support regexp search.
|
||||
final String observatoryLine = await device.adb(<String>['logcat', '-e', 'Observatory listening on http:', '-m', '1', '-T', currentTime]);
|
||||
print('Found observatory line: $observatoryLine');
|
||||
final String observatoryUri = RegExp('Observatory listening on ((http|\/\/)[a-zA-Z0-9:/=_\\-\.\\[\\]]+)').firstMatch(observatoryLine)[1];
|
||||
final String observatoryUri = RegExp(r'Observatory listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)').firstMatch(observatoryLine)[1];
|
||||
print('Extracted observatory port: $observatoryUri');
|
||||
|
||||
section('Launching attach with given port');
|
||||
|
||||
@@ -47,7 +47,7 @@ void main() {
|
||||
await device.shellExec('am', <String>['start', '-n', _kActivityId]);
|
||||
final String observatoryLine = await device.adb(<String>['logcat', '-e', 'Observatory listening on http:', '-m', '1', '-T', currentTime]);
|
||||
print('Found observatory line: $observatoryLine');
|
||||
final String observatoryUri = RegExp('Observatory listening on ((http|\/\/)[a-zA-Z0-9:/=_\\-\.\\[\\]]+)').firstMatch(observatoryLine)[1];
|
||||
final String observatoryUri = RegExp(r'Observatory listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)').firstMatch(observatoryLine)[1];
|
||||
print('Extracted observatory port: $observatoryUri');
|
||||
final Process attachProcess =
|
||||
await _run(device: device, command: <String>['attach', '--debug-uri',
|
||||
|
||||
@@ -589,7 +589,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 _obsUriRegExp = RegExp('((http|\/\/)[a-zA-Z0-9:/=_\\-\.\\[\\]]+)');
|
||||
final RegExp _obsUriRegExp = RegExp(r'((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)');
|
||||
|
||||
/// Tries to extract a port from the string.
|
||||
///
|
||||
|
||||
@@ -55,7 +55,7 @@ TaskFunction createHotModeTest({String deviceIdOverride, Map<String, String> env
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
if (line.contains('\] Reloaded ')) {
|
||||
if (line.contains('] Reloaded ')) {
|
||||
if (hotReloadCount == 0) {
|
||||
// Update the file and reload again.
|
||||
final File appDartSource = file(path.join(
|
||||
@@ -108,7 +108,7 @@ TaskFunction createHotModeTest({String deviceIdOverride, Map<String, String> env
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
if (line.contains('\] Reloaded ')) {
|
||||
if (line.contains('] Reloaded ')) {
|
||||
process.stdin.writeln('q');
|
||||
}
|
||||
print('stdout: $line');
|
||||
|
||||
@@ -32,7 +32,7 @@ TaskFunction createRunWithoutLeakTest(dynamic dir) {
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
if (line.contains('\] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q"')) {
|
||||
if (line.contains('] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q"')) {
|
||||
process.stdin.writeln('q');
|
||||
}
|
||||
print('stdout: $line');
|
||||
|
||||
Reference in New Issue
Block a user