Skip to content

Test description is not parsed if it includes "> #3863

Closed

Description

@mrverdant13

Description

Some test descriptions that include double quotes result in parsing issues that blocks the execution of the actual test.

How to reproduce

Case 1

Enclosing double quotes with a wrapped content that starts with a >.

test('version is ">={version}', () {
  // My test
});
test('version is "> something"', () {
  // My test
});

Output:

image

Case 2

Single " char followed by a > char (without closing the quotes).

test('version is "> something', () {
  // My test
});

Output:

image

Expected behaviour

The tests descriptions are expected to be parsed and the underlying test to be run.

More context

  • OS: Windows 11
  • VS Code version: 1.65.0
  • Dart extension version: v3.36.0
  • Dart/Flutter SDK version: 2.16.1

Activity

  1. changed the title [-]Test description is not parsed if it includes `"`[/-] [+]Test description is not parsed if it includes `">`[/+] on Mar 5, 2022
  2. added this to the v3.38.0 milestone on Mar 7, 2022
  3. added
    in testingRelates to test execution of Dart/Flutter tests for end users
    on Mar 7, 2022
  4. DanTup commented on Mar 7, 2022

    @DanTup
    Member

    I can't reproduce this on macOS and wonder if it's somehow related to quote escaping. In the logs (collected with the Dart: Capture Debugging Logs command) things appear to be escaped correctly:

    [Info] Spawning /Users/danny/Dev/Dart SDKs/nightly/bin/dart with args ["run","--no-serve-devtools","test:test","-r","json","-j1","--name","^version is \">=\\{version\\}( \\(variant: .*\\))?$","--run-skipped","test/quote_test.dart"]
    [Info] Spawning /Users/danny/Dev/Dart SDKs/nightly/bin/dart with args ["run","--no-serve-devtools","test:test","-r","json","-j1","--name","^version is \"> something\"( \\(variant: .*\\))?$","--run-skipped","test/quote_test.dart"]
    [Info] Spawning /Users/danny/Dev/Dart SDKs/nightly/bin/dart with args ["run","--no-serve-devtools","test:test","-r","json","-j1","--name","^version is \"> something( \\(variant: .*\\))?$","--run-skipped","test/quote_test.dart"]
    

    Will do some testing on Windows soon.

  5. added a commit that references this issue on Sep 2, 2025
    24eacf0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions