dart-lang / dart-lang/test

'$' not escaped when printing a multi-line string

Open
#2,346 0 comments 0 reactions 0 assignees View on GitHub
package:matcher type-bug
Dominant language
Dart
Stars
536
Forks
232
Avg merge
1d 10h
Merged PRs (30d)
10

Description

If the equality matcher fails for a string, in the "Actual" section where it prints each line as a single-quoted string, the dollar sign should be escaped.

Here is the output where I saw this: 'const M$json = const {\n'

Contributor guide

Open the contributing guide

Research direction

Reproduce a failed equality matcher using a multi-line string containing a dollar sign, then locate the code that formats the Actual section as single-quoted lines. Done means the dollar sign is escaped in that output without changing other string formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.