No tests match regular expression " test & exit /B 0". #4007
Copy link
Copy link
Closed
Labels
in flutterRelates to running Flutter appsRelates to running Flutter appsin testingRelates to test execution of Dart/Flutter tests for end usersRelates to test execution of Dart/Flutter tests for end usersis bugon windows
Milestone
Description
Hi
vscode is having a problem running tests with a multi-line string description.
How to reproduce:
This will pass:
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('''test''', (tester) async {});
}This will not pass:
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('''
test
''', (tester) async {});
}keep in mind that the later test will pass if run through void main.
[√] VS Code (version 1.67.2)
• VS Code at C:\Users\m_ben\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.42.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in flutterRelates to running Flutter appsRelates to running Flutter appsin testingRelates to test execution of Dart/Flutter tests for end usersRelates to test execution of Dart/Flutter tests for end usersis bugon windows
Activity
DanTup commentedon Jun 7, 2022
I don't seem to be able to repro this (I'm using the "Run" link on the test, which I presume is what you're doing too):
Could you try capturing some logs?
Thanks!
DanTup commentedon Jun 7, 2022
Actually, I can repro on Windows, and only Flutter tests, not Dart tests.
jeff9315 commentedon Aug 28, 2022
I am still having this problem on 3.46.1 using Windows 11. Multiline comments of 3 or more lines fail with this error message when run individually but work when run from a group or from main() in the test file.
DarkHeros09 commentedon Aug 28, 2022
yes i can confirm this too on my win10 machine.
DanTup commentedon Aug 30, 2022
The original test case above seems to work for me, but the test case in #4125 does not, so I think there's something else giong on. Let's use #4125 instead of re-opening this, since the case reported above does seem fixed.
Fix running tests with newlines in name from CodeLens on Windows