From fd550bc654f1ef038a0cae140cd050300332a513 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 5 Oct 2025 13:45:26 -0400 Subject: [PATCH] feat(setup): warn no tests found --- lua/cp/setup.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/cp/setup.lua b/lua/cp/setup.lua index 4127c93..4986248 100644 --- a/lua/cp/setup.lua +++ b/lua/cp/setup.lua @@ -57,6 +57,12 @@ function M.setup_contest(platform, contest_id, problem_id, language) logger.log(('Fetching test cases...'):format(cached_len, #problems)) scraper.scrape_all_tests(platform, contest_id, function(ev) local cached_tests = {} + if vim.tbl_isempty(ev.tests) then + logger.log( + ("No tests found for problem '%s'."):format(ev.problem_id), + vim.log.levels.WARN + ) + end for i, t in ipairs(ev.tests) do cached_tests[i] = { index = i, input = t.input, expected = t.expected } end