Skip to content

Commit 5deae63

Browse files
committed
add a test
1 parent 42eac4e commit 5deae63

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/plenary/ui/mappings/meta_return_spec.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,4 +522,24 @@ describe('Meta return mappings', function()
522522
}, vim.api.nvim_buf_get_lines(0, 3, 10, false))
523523
end
524524
)
525+
526+
it('should add list item after a link with Enter (org_meta_return)', function()
527+
helpers.create_agenda_file({
528+
'#TITLE: Test',
529+
'',
530+
'* TODO Test orgmode',
531+
' - Regular item',
532+
' - [[http://www.com][a link]]',
533+
' - [x] Checkbox item',
534+
})
535+
536+
vim.fn.cursor(5, 14)
537+
vim.cmd([[exe "norm ,\<CR>"]])
538+
assert.are.same({
539+
' - Regular item',
540+
' - [[http://www.com][a link]]',
541+
' - ',
542+
' - [x] Checkbox item',
543+
}, vim.api.nvim_buf_get_lines(0, 3, 10, false))
544+
end)
525545
end)

0 commit comments

Comments
 (0)