plenary.nvim
plenary.nvim copied to clipboard
Cannot load quickfixlist with tests results
TLDR:
The way failed tests are notified makes it hard to load them into quickfixlist.
Description
I use vim-dispatch to run tests, which runs a makefile and loads output to quickfixlist. The problem is that Plenary seems to prepend 3 dots (...) to long paths creating a non-valid path for quickfixlist to follow.
As you can see in the following quickfixlist, it's filled with invalid paths and noise
- Resulting quickfixlist:
|| ========================================
|| Testing: /home/eruizc/repos/eruizc-dev/rubberduck-nvim/lua/spec/rubberduck/utils/file_spec.lua
|| [31mFail[0m || file read returns file contents
.../rubberduck-nvim/lua/spec/rubberduck/utils/file_spec.lua|23| Expected objects to be equal.
|| Passed in:
|| (string) 'adsf'
|| Expected:
|| (string) ''
||
|| stack traceback:
.../rubberduck-nvim/lua/spec/rubberduck/utils/file_spec.lua|23| in function <.../rubberduck-nvim/lua/spec/rubberduck/utils/file_spec.lua:18>
||
|| [32mSuccess[0m || file read excepts on unexisting file
|| [32mSuccess[0m || file read excepts on unreadable file
|| [32mSuccess[0m || file read reads correctly when content is empty
|| [32mSuccess[0m || file read reads correctly when content is 'nil'
|| [32mSuccess[0m || file read reads correctly when content is 'null'
|| [32mSuccess[0m || file read reads correctly when content is '0'
||
|| [32mSuccess: [0m 6
|| [31mFailed : [0m 1
|| [31mErrors : [0m 0
|| ========================================
|| Tests Failed. Exit: 1
- This is my makefile:
test:
nvim --headless -c "PlenaryBustedDirectory ."
It may be related to issue https://github.com/nvim-lua/plenary.nvim/issues/73, but one is for human readability and this one is for parsing
Repro steps
- Install plenary.nvim and vim-dispatch
- Create a lua project with a makefile like the previously mentioned (or you can also clone mine)
- Run
:Makecommand - See the resulting quickfixlist with
:copen
We should add a different output format maybe that is JSON or something and you could just put in qflist programmatically