Skip to content

Commit 675257c

Browse files
committed
add a test
1 parent 43fd594 commit 675257c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Diff for: tests/plenary/ui/mappings/checkbox_spec.lua

+21
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,25 @@ describe('Checkbox mappings', function()
151151
'- [ ] checkbox item',
152152
}, vim.api.nvim_buf_get_lines(0, 0, 6, false))
153153
end)
154+
155+
it('should update headline cookies from multiple lists', function()
156+
helpers.create_file({
157+
'* Test orgmode [/]',
158+
'First List',
159+
'- [ ] checkbox item',
160+
'- [ ] checkbox item',
161+
'Second List',
162+
'- [ ] checkbox item',
163+
})
164+
vim.fn.cursor(4, 1)
165+
vim.cmd([[exe "norm \<C-space>"]])
166+
assert.are.same({
167+
'* Test orgmode [1/3]',
168+
'First List',
169+
'- [ ] checkbox item',
170+
'- [X] checkbox item',
171+
'Second List',
172+
'- [ ] checkbox item',
173+
}, vim.api.nvim_buf_get_lines(0, 0, 6, false))
174+
end)
154175
end)

0 commit comments

Comments
 (0)