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
7ee910b0
Unverified
Commit
7ee910b0
authored
Jan 15, 2021
by
Jonah Williams
Committed by
GitHub
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] ensure --dart-define can parse args with commas (#73798)
parent
b2f99e56
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
5 deletions
+6
-5
test.dart
dev/bots/test.dart
+2
-2
integration_tests.dart
dev/devicelab/lib/tasks/integration_tests.dart
+1
-1
defines_test.dart
dev/integration_tests/ui/test_driver/defines_test.dart
+1
-1
web_define_loading.dart
dev/integration_tests/web/lib/web_define_loading.dart
+1
-1
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+1
-0
No files found.
dev/bots/test.dart
View file @
7ee910b0
...
...
@@ -1028,13 +1028,13 @@ Future<void> _runWebIntegrationTests() async {
await
_runWebDebugTest
(
'lib/null_safe_main.dart'
,
enableNullSafety:
true
);
await
_runWebDebugTest
(
'lib/web_define_loading.dart'
,
additionalArguments:
<
String
>[
'--dart-define=test.valueA=Example'
,
'--dart-define=test.valueA=Example
,A
'
,
'--dart-define=test.valueB=Value'
,
]
);
await
_runWebReleaseTest
(
'lib/web_define_loading.dart'
,
additionalArguments:
<
String
>[
'--dart-define=test.valueA=Example'
,
'--dart-define=test.valueA=Example
,A
'
,
'--dart-define=test.valueB=Value'
,
]
);
...
...
dev/devicelab/lib/tasks/integration_tests.dart
View file @
7ee910b0
...
...
@@ -131,7 +131,7 @@ TaskFunction dartDefinesTask() {
return
DriverTest
(
'
${flutterDirectory.path}
/dev/integration_tests/ui'
,
'lib/defines.dart'
,
extraOptions:
<
String
>[
'--dart-define=test.valueA=Example'
,
'--dart-define=test.valueA=Example
,A
'
,
'--dart-define=test.valueB=Value'
,
],
);
...
...
dev/integration_tests/ui/test_driver/defines_test.dart
View file @
7ee910b0
...
...
@@ -17,6 +17,6 @@ void main() {
});
test
(
'Can run with --dart-define'
,
()
async
{
await
driver
.
waitFor
(
find
.
text
(
'ExampleValue'
));
await
driver
.
waitFor
(
find
.
text
(
'Example
,A
Value'
));
});
}
dev/integration_tests/web/lib/web_define_loading.dart
View file @
7ee910b0
...
...
@@ -8,7 +8,7 @@ Future<void> main() async {
final
StringBuffer
output
=
StringBuffer
();
const
String
combined
=
String
.
fromEnvironment
(
'test.valueA'
)
+
String
.
fromEnvironment
(
'test.valueB'
);
if
(
combined
==
'ExampleValue'
)
{
if
(
combined
==
'Example
,A
Value'
)
{
output
.
write
(
'--- TEST SUCCEEDED ---'
);
print
(
'--- TEST SUCCEEDED ---'
);
}
else
{
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
7ee910b0
...
...
@@ -476,6 +476,7 @@ abstract class FlutterCommand extends Command<void> {
'and double.fromEnvironment constructors.
\n
'
'Multiple defines can be passed by repeating --dart-define multiple times.'
,
valueHelp:
'foo=bar'
,
splitCommas:
false
,
);
}
...
...
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