plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

PlenaryBustedDirectory not working on windows

Open qgymib opened this issue 4 years ago • 2 comments

This is beacuse currently plenary.test_harness use find to get all *_spec.lua, but windows builtin FIND is quite different from gnu find, which leads harness._find_files_to_run return an empty result.

function harness._find_files_to_run(directory)
  local finder = Job:new {
    command = "find",
    args = { directory, "-type", "f", "-name", "*_spec.lua" },
  }

  return vim.tbl_map(Path.new, finder:sync())
end

May be it is better to use plenary.scandir to do such a thing?

qgymib avatar Oct 12 '21 15:10 qgymib

Windows is currently not supported.

I tried to make it work, also with moving to scandir, but everytime i fixed an issue 10 more poped up. Maybe you wanna do it, i dont have a windows system so it was a nightmare to try to fix it.

Here is my work: https://github.com/nvim-lua/plenary.nvim/pull/74/files#diff-503c6d245571ab4d81c154079fb5736a3276b23ec1f97f09d826821f4c80168fR1

Conni2461 avatar Oct 12 '21 19:10 Conni2461

Windows is currently not supported.

Just to clarify, is this still the case? If not, do you know of any examples out in the wild of running the plenary test harness on windows? Pretty much any issues I get reported that has to do with plenary is always regarding something to do with windows, so I'd love to be able to test for this. I also see that Plenary itself doesn't test on windows? Is that intentional because it's not supported, or an oversight, or something else?

ckipp01 avatar Feb 05 '22 10:02 ckipp01