lewis6991 / gitsigns.nvim

Git integration for buffers
MIT License
4.92k stars 187 forks source link

enable `luarocks test` #913

Open teto opened 10 months ago

teto commented 10 months ago

Is your feature request related to a problem? Please describe. I would like luarocks test to work out of the box, ie., let luarocks be able to run the gitsigns.nvim testsuite

   > building
   > running tests
   >
   > Error: could not detect test type -- no test suite for gitsigns.nvim?

Describe the solution you'd like Looking at the luarocks code, one can:

https://github.com/luarocks/luarocks/wiki/test

Describe alternatives you've considered I am able to run the tests manually but luarocks test creates a convention that can work across packages and as a package manager, it makes my work easier. Also going through luarocks, you can specify dependencies just for tests.

Additional context I think I hit https://github.com/lewis6991/gitsigns.nvim/issues/847 so I thought this would be a good time to enable tests in the nixpkgs gitsigns-nvim package but then hit > Error: could not detect test type -- no test suite for gitsigns.nvim?. I can perfectly work around it but having lua packages/neovim plugins support luarocks test would make that a ton easier. gitsigns being very popular, it can set a good example.

lewis6991 commented 10 months ago

FYI I've kinda given up on Luarocks so this isn't something I'll want to work on.

lewis6991 commented 10 months ago

Also the testsuite uses nvim -l as the lua interpreter, not sure if luarocks can support that.

mrcjkb commented 10 months ago

this can be used as a wrapper for nvim -l with luarocks. I plan on packaging it for luarocks sometime soon.