Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
170 lines
4.6 KiB
Plaintext
170 lines
4.6 KiB
Plaintext
scriptencoding utf-8
|
|
Describe basic_asterisk
|
|
|
|
Before all
|
|
let lines = [
|
|
\ '1.asterisk 2.asterisk 3.asterisk'
|
|
\ , '4.Asterisk 5.AsteRisK 6.Asterisk'
|
|
\ , ''
|
|
\ , '7.アスタリスク 8.アスタリスクです 9.アスタリスク?'
|
|
\ , '.* .* .*'
|
|
\ , '.* asterisk asterisk'
|
|
\ ]
|
|
call g:Add_lines(lines)
|
|
End
|
|
|
|
Before each
|
|
call cursor([1, 1])
|
|
normal! 2l
|
|
End
|
|
|
|
After all
|
|
:1,$ delete
|
|
End
|
|
|
|
Context *
|
|
It search forward with \<\>
|
|
let @/ = ''
|
|
normal *
|
|
Assert Equals(@/, '\<asterisk\>')
|
|
End
|
|
It search forward the 1th occurrence of the word
|
|
normal *
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It search forward the 2th occurrence of the word
|
|
normal 2*
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '3')
|
|
End
|
|
It search forward in the middle of word
|
|
normal! l
|
|
normal *
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It search forward multibyte word
|
|
normal! 3j
|
|
normal *
|
|
normal! B
|
|
Assert Equals(g:Get_pos_char(), '8')
|
|
End
|
|
It throws the error if there are no <cword>
|
|
normal! 2j
|
|
Throws /E348: No string under cursor/ :normal *
|
|
End
|
|
|
|
Context regular expression handling
|
|
It use regular expression characters under cursor if there are no keyword word after them
|
|
normal! 4j0
|
|
normal *
|
|
Assert Equals(@/, '\.\*')
|
|
End
|
|
It do not use regular expression characters under cursor if there are keyword words after them
|
|
normal! 5j0
|
|
normal *
|
|
Assert Equals(@/, '\<asterisk\>')
|
|
End
|
|
End
|
|
|
|
End
|
|
|
|
Context g*
|
|
It search forward without \<\>
|
|
let @/ = ''
|
|
normal g*
|
|
Assert Equals(@/, 'asterisk')
|
|
End
|
|
It search forward the 1th occurrence of the word
|
|
normal g*
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It search forward the 2th occurrence of the word
|
|
normal 2*
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '3')
|
|
End
|
|
It search forward in the middle of word
|
|
normal! l
|
|
normal g*
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It throws the error if there are no <cword>
|
|
normal! 2j
|
|
Throws /E348: No string under cursor/ :normal g*
|
|
End
|
|
It search forward with the first keyword after the cursor
|
|
normal! h
|
|
normal *
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It search forward with ignorecase
|
|
set ignorecase nosmartcase
|
|
normal! j
|
|
normal *
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '5')
|
|
set ignorecase& smartcase&
|
|
End
|
|
It search forward with smartcase
|
|
set ignorecase smartcase
|
|
normal! j
|
|
normal *
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '6')
|
|
set ignorecase& smartcase&
|
|
End
|
|
End
|
|
|
|
Context #
|
|
It search backward with \<\>
|
|
let @/ = ''
|
|
normal #
|
|
Assert Equals(@/, '\<asterisk\>')
|
|
End
|
|
It search backward the 1th occurrence of the word
|
|
normal! $b
|
|
normal #
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It search backward the 2th occurrence of the word
|
|
normal! $b
|
|
normal 2#
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '1')
|
|
End
|
|
It search backward at the end of word
|
|
normal! $
|
|
normal #
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It search backward in the middle of word
|
|
normal! $h
|
|
normal #
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
It search backward with the first keyword after the cursor
|
|
normal! $bh
|
|
normal #
|
|
normal! 2h
|
|
Assert Equals(g:Get_pos_char(), '2')
|
|
End
|
|
End
|
|
|
|
Context g#
|
|
It search backward with \<\>
|
|
let @/ = ''
|
|
normal g#
|
|
Assert Equals(@/, 'asterisk')
|
|
End
|
|
End
|
|
|
|
End
|