mesonbuild / vscode-meson

Meson for VisualStudio Code
Apache License 2.0
99 stars 49 forks source link

Fix tests with spaces in their names not executing when ran from the testing ui #237

Open apache-hb opened 1 month ago

apache-hb commented 1 month ago

Previously running a test which contained a space in its name, ie command line parsing would result in the test runner printing

ERROR: *:command test name does not match any test

This encloses the test name in quotes so its parsed correctly on the command line.

tristan957 commented 3 weeks ago

Can you use a real commit message? Can you confirm that this actually works. Upon first inspection, I don't really see why this would work.

apache-hb commented 3 weeks ago

Can you use a real commit message?

Fixed

Can you confirm that this actually works.

I tested it by running tests from the vscode test provider and having them pass rather than error out with the error message mentioned above. image

Upon first inspection, I don't really see why this would work.

This works because child_process.execFile - at least on windows - concatenates all arguments together naïvely before handing them off to CreateProcess. Adding the quotes makes meson/python parse the test name as a single argument rather than multiple.

tristan957 commented 3 weeks ago

Do we have the same problem if buildDir has a space in it?