feat(setup): warn no tests found
This commit is contained in:
parent
25fde26943
commit
fd550bc654
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue