Skip to content

Commit

Permalink
fix: when there is not tests, return immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
Civitasv committed May 3, 2024
1 parent fa4e9d5 commit eb798c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/cmake-tools/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,10 @@ function cmake.run_test(opt)
end
local env = environment.get_build_environment(config, config.executor.name == "terminal")
local all_tests = ctest.list_all_tests(config:build_directory_path())
all_tests = { "run all", table.unpack(all_tests) }
if #all_tests == 0 then
return
end
table.insert(all_tests, 1, "all")
vim.ui.select(
all_tests,
{ prompt = "select test to run" },
Expand Down

0 comments on commit eb798c8

Please sign in to comment.