Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mrverdant13 opened this issue Mar 5, 2022 · 2 comments
Closed

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

mrverdant13 opened this issue Mar 5, 2022 · 2 comments
Labels
in testing Relates to test execution of Dart/Flutter tests for end users is bug
Milestone

Comments

@mrverdant13
Copy link

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
@mrverdant13 mrverdant13 changed the title Test description is not parsed if it includes " Test description is not parsed if it includes "> Mar 5, 2022
@DanTup DanTup added this to the v3.38.0 milestone Mar 7, 2022
@DanTup DanTup added the in testing Relates to test execution of Dart/Flutter tests for end users label Mar 7, 2022
@DanTup
Copy link
Member

DanTup commented Mar 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in testing Relates to test execution of Dart/Flutter tests for end users is bug
Projects
None yet
Development

No branches or pull requests

2 participants