Dynamic test play button in text window stops working when spaces are added to a test name that did not previously have them #728
Labels
bug
Issue identified by VS Code Team member as probable bug
When adding spaces to the start of the test line, the dynamic test play button in text window can sometimes stop functioning for a test, while the test window play button continues to work for the same test.
This is evident when using the simple test-provider-sample, if you make a single change to the sample code:
change this line in
parser.ts
:const testRe = /^([0-9]+)\s*([+*/-])\s*([0-9]+)\s*=\s*([0-9]+)/;
to this:
const testRe = /^\s*([0-9]+)\s*([+*/-])\s*([0-9]+)\s*=\s*([0-9]+)/;
Now if you fire up the extension host, and add spaces to the front of a test line, you would expect the test to still work.
And it does, from the testing window, but the dynamic play button inside the text window stops functioning.
Notes:
If instead of typing spaces, you copy/paste the text with spaces, the text window play button will start working again.
If you save, close and open the text window, the text window play button will start working again.
If when you open the test file, it already has spaces in front of the test, and you add more spaces, the test window play button will continue work until you remove all spaces, then if you add spaces again it will stop working.
68 sec gif showing the problem:
https://github.com/jimasp/public-misc/blob/main/sample-1666430441223.gif
The text was updated successfully, but these errors were encountered: