I broke up with neovim....vim is my best friend now

This commit is contained in:
LinlyBoi
2023-04-30 08:14:07 +03:00
parent 0d185449c5
commit 4a4a6b1e81
5245 changed files with 468325 additions and 25 deletions

View File

@@ -0,0 +1,61 @@
Describe lsp#utils#range
Before each
% delete _
End
Describe lsp#utils#range#_get_recent_visual_range
It should return single line visual selection
call setline(1, ['あいうえお'])
normal! gg0llvly
Assert Equals(lsp#utils#range#_get_recent_visual_range(), {
\ 'start': {
\ 'line': 0,
\ 'character': 2
\ },
\ 'end': {
\ 'line': 0,
\ 'character': 4
\ }
\ })
End
It should return multi line visual selection
call setline(1, ['あいうえお', 'かきくけこ'])
normal! gg0llvjly
Assert Equals(lsp#utils#range#_get_recent_visual_range(), {
\ 'start': {
\ 'line': 0,
\ 'character': 2
\ },
\ 'end': {
\ 'line': 1,
\ 'character': 4
\ }
\ })
End
End
Describe lsp#utils#range#_get_current_line_range
It should return current line range
call setline(1, ['あいうえお', 'かきくけこ', 'さしすせそ'])
call cursor(2, 1)
Assert Equals(lsp#utils#range#_get_current_line_range(), {
\ 'start': {
\ 'line': 1,
\ 'character': 0
\ },
\ 'end': {
\ 'line': 1,
\ 'character': 5
\ }
\ })
End
End
End