Skip to content

Improve error message on string matching #177479

@Piinks

Description

@Piinks

We should improve the error message on string matching in flutter_test.

We have been looking at how to best roll in updates to date localizations that have (in a few cases) updated typical whitespace (U+0020) to be NBSP (non breaking space, U+202F). The localizations team confirmed this is WAI, and in some locales (like French) is a required typography rule.

We have found users' might experience this update like this:

Image

Which would be super frustrating to debug! We should improve the error message here to specify what the whitespace character is in the error message.

Separately we also discussed that in some cases (maybe not this particular case) users might like a test method that allows them to match strings without attention paid to whitespace, tracked in #177478

A little bit more context on this from the localizations team is available in b/442629033

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: error messageError messages from the Flutter frameworka: internationalizationSupporting other languages or locales. (aka i18n)a: tests"flutter test", flutter_test, or one of our testsc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions