test: land the vim diary -count cases + dedup the lua one (follow-up to 2da2168)
CI / cargo fmt --check (push) Successful in 32s
CI / cargo clippy (push) Successful in 35s
CI / cargo test (push) Successful in 27s
CI / editor keymaps (push) Successful in 1m25s

2da2168's diary test edits landed unevenly: the lua
cmd.VimwikiMakeDiaryNote_has_count case got inserted twice, and the two vim
cases (cmd.Vimwiki{MakeDiaryNote,DiaryIndex}_accepts_count) the commit message
referenced never landed (the Edit had no-matched). Remove the lua duplicate and
add the two vim cases before the harness wrap-up. lua 284, vim 274/18/21, all
0 failed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 22:35:41 +00:00
parent 2da2168d88
commit 88114a65a4
2 changed files with 29 additions and 9 deletions
+29
View File
@@ -727,6 +727,35 @@ call s:record(
\ 'complete.colors_from_buffer_spans',
\ 'got ' . string(s:cl))
" ===== Diary-note family -count=0 (wiki selector) =====
" Was bare: `:2VimwikiMakeDiaryNote` raised E481. The diary open is an LSP
" roundtrip (no server here), so assert only the attribute parse: no E481.
call s:set_buf(['= page ='])
let s:dc_err = ''
try
silent 2VimwikiMakeDiaryNote
catch /E481/
let s:dc_err = v:exception
catch
" non-E481 (e.g. no LSP attached) is expected and fine here.
endtry
call s:record(
\ s:dc_err ==# '' ? 1 : 0,
\ 'cmd.VimwikiMakeDiaryNote_accepts_count',
\ 'err=' . s:dc_err)
let s:di_err = ''
try
silent 2VimwikiDiaryIndex
catch /E481/
let s:di_err = v:exception
catch
endtry
call s:record(
\ s:di_err ==# '' ? 1 : 0,
\ 'cmd.VimwikiDiaryIndex_accepts_count',
\ 'err=' . s:di_err)
" ===== Wrap up =====
call add(s:results, '')
-9
View File
@@ -915,15 +915,6 @@ vim.defer_fn(function()
error('VimwikiMakeDiaryNote missing -count: ' .. vim.inspect(c))
end
end)
-- Diary-note family carries -count=0 (vimwiki's wiki selector), so
-- `:2VimwikiMakeDiaryNote` selects wiki #2 instead of raising E481.
tobj_case('cmd.VimwikiMakeDiaryNote_has_count', function()
local c = vim.api.nvim_buf_get_commands(0, {}).VimwikiMakeDiaryNote
if not c then error(':VimwikiMakeDiaryNote not defined') end
if c.count == nil or c.count == false then
error('VimwikiMakeDiaryNote missing -count: ' .. vim.inspect(c))
end
end)
-- `:VimwikiNormalizeLink 1` (the arg is upstream's visual flag; the command
-- is -nargs=? not -range, so no `'<,'>`) wraps the last visual selection.
tobj_case('cmd.normalize_link_visual_wraps_selection', function()