fix: Non-ASCII test names being escaped when creating run configurations#8838
fix: Non-ASCII test names being escaped when creating run configurations#8838pq merged 4 commits intoflutter:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request correctly resolves an issue where non-ASCII test names were improperly escaped, preventing tests from running. The refactoring of test name extraction logic into a separate, testable method is a positive change for code quality. My review includes suggestions to further improve the new code by adhering to the repository's style guide, specifically by using java.util.Optional to avoid returning null values, which enhances null safety.
|
Thanks for the contribution! This seems like a good change. Are you able to run locally (or build a local copy of the plugin) and provide a gif of this working? (also, sorry about the delay in my response. I missed checking PRs last week) |
|
@helin24 Thanks for the review! No worries about the delay. Here's a demo of it working locally:
While recording this, I noticed that the first test marker in the file is not showing sometimes. After some investigation, I found the following issues:
I can open a separate PR (issue) to fix these if you'd like. |
StringUtil.escapeProperty() was incorrectly applied to test names in CommonTestConfigUtils.findTestName(), converting non-ASCII characters (e.g. Japanese "テスト") to Unicode escape sequences. This caused `flutter test --plain-name` to receive an escaped string that did not match the actual test name, preventing the test from running. Fix by removing the escapeProperty() call, which is intended for .properties file encoding and is unnecessary here.
fbe0345 to
5d04b09
Compare
5d04b09 to
f2a1c38
Compare
Co-authored-by: Helin Shiah <helinx@google.com>


StringUtil.escapeProperty()was incorrectly applied to test names inCommonTestConfigUtils.findTestName(), converting non-ASCII characters (e.g. Japanese "テスト") to Unicode escape sequences. This causedflutter test --plain-nameto receive an escaped string that did not match the actual test name, preventing the test from running.Fix by removing the
escapeProperty()call, which is intended for.propertiesfile encoding and is unnecessary here.fixes #7985
Contribution guidelines:
dart format.