klen / nvim-test

A Neovim wrapper for running tests
MIT License
180 stars 27 forks source link

fix(go-test): add space between cmd and path #6

Closed dhruvmanila closed 2 years ago

dhruvmanila commented 2 years ago

For go-test runner, when running the TestFile command for a file which is in a directory nested inside the current working directory, there's a space missing between the command and file path.

Running the newly added test case without the fix would produce:

go test./go/...
       ^
       Here, a space is missing

Test Update

As there's a need to cd inside the test case, we cannot just use the cd - command. Instead, the current working directory will be stored in a global variable pwd and the after_each function will use that to cd back.

klen commented 2 years ago

@dhruvmanila Great! Thank you!