Closed noniq closed 4 years ago
vscode-ruby-test-adapter
Running a single test / single test file works.
Running a single test / single test file fails if the test file’s path contains spaces.
When constructing the command for running a single test, the test file’s path is not escaped, see https://github.com/connorshea/vscode-ruby-test-adapter/blob/fba16b983f2c61bdedef123cef33cd4624403d03/src/rspecTests.ts#L95
A quick workaround is to add quotes around ${testLocation} like this:
${testLocation}
let testCommand = `${this.getTestCommand()} --require ${this.getCustomFormatterLocation()} --format CustomFormatter "${testLocation}"`;
The proper fix would be to use shell escaping for all the arguments (including the test comannd and the formatter location).
Running a single test file suffers from the same issue, see https://github.com/connorshea/vscode-ruby-test-adapter/blob/fba16b983f2c61bdedef123cef33cd4624403d03/src/rspecTests.ts#L120
Your environment
vscode-ruby-test-adapter
version: 0.6.1Expected behavior
Running a single test / single test file works.
Actual behavior
Running a single test / single test file fails if the test file’s path contains spaces.
Cause
When constructing the command for running a single test, the test file’s path is not escaped, see https://github.com/connorshea/vscode-ruby-test-adapter/blob/fba16b983f2c61bdedef123cef33cd4624403d03/src/rspecTests.ts#L95
A quick workaround is to add quotes around
${testLocation}
like this:The proper fix would be to use shell escaping for all the arguments (including the test comannd and the formatter location).
Running a single test file suffers from the same issue, see https://github.com/connorshea/vscode-ruby-test-adapter/blob/fba16b983f2c61bdedef123cef33cd4624403d03/src/rspecTests.ts#L120