diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:19:40 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:19:40 +0300 |
commit | 7af8601db4bba355753241c2326b80410b187350 (patch) | |
tree | af56b809a3a24be5b1d5d0de12ee23dc0bc1f2b8 /src/nvim/testdir | |
parent | 62993323494d846190590606d37aff1136421671 (diff) | |
parent | 27a577586eace687c47e7398845178208cae524a (diff) | |
download | rneovim-7af8601db4bba355753241c2326b80410b187350.tar.gz rneovim-7af8601db4bba355753241c2326b80410b187350.tar.bz2 rneovim-7af8601db4bba355753241c2326b80410b187350.zip |
Merge branch 'master' into expression-parser
Hoping that could fix the LSAN issue: no idea what it is talking about.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/runtest.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 25 | ||||
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 34 |
3 files changed, 59 insertions, 1 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 39ffabc024..4de1345679 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -203,7 +203,6 @@ let s:flaky = [ \ ] " Locate Test_ functions and execute them. -set nomore redir @q silent function /^Test_ redir END diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 5fc519f822..ac44e09a5a 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -306,3 +306,28 @@ func Test_cmdline_complete_wildoptions() call assert_equal(a, b) bw! endfunc + +" using a leading backslash here +set cpo+=C + +func Test_cmdline_search_range() + new + call setline(1, ['a', 'b', 'c', 'd']) + /d + 1,\/s/b/B/ + call assert_equal('B', getline(2)) + + /a + $ + \?,4s/c/C/ + call assert_equal('C', getline(3)) + + call setline(1, ['a', 'b', 'c', 'd']) + %s/c/c/ + 1,\&s/b/B/ + call assert_equal('B', getline(2)) + + bwipe! +endfunc + +set cpo& diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 59807ca946..0ce034b63e 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -207,39 +207,73 @@ func! Test_mode() normal! 3G exe "normal i\<F2>\<Esc>" call assert_equal('i-i', g:current_modes) + " i_CTRL-P: Multiple matches exe "normal i\<C-G>uBa\<C-P>\<F2>\<Esc>u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-P: Single match exe "normal iBro\<C-P>\<F2>\<Esc>u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X exe "normal iBa\<C-X>\<F2>\<Esc>u" call assert_equal('i-ix', g:current_modes) + " i_CTRL-X CTRL-P: Multiple matches exe "normal iBa\<C-X>\<C-P>\<F2>\<Esc>u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-P: Single match exe "normal iBro\<C-X>\<C-P>\<F2>\<Esc>u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-P + CTRL-P: Single match exe "normal iBro\<C-X>\<C-P>\<C-P>\<F2>\<Esc>u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-L: Multiple matches + exe "normal i\<C-X>\<C-L>\<F2>\<Esc>u" + call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-L: Single match + exe "normal iBlu\<C-X>\<C-L>\<F2>\<Esc>u" + call assert_equal('i-ic', g:current_modes) + " i_CTRL-P: No match exe "normal iCom\<C-P>\<F2>\<Esc>u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-P: No match exe "normal iCom\<C-X>\<C-P>\<F2>\<Esc>u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-L: No match + exe "normal iabc\<C-X>\<C-L>\<F2>\<Esc>u" + call assert_equal('i-ic', g:current_modes) + " R_CTRL-P: Multiple matches exe "normal RBa\<C-P>\<F2>\<Esc>u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-P: Single match exe "normal RBro\<C-P>\<F2>\<Esc>u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X exe "normal RBa\<C-X>\<F2>\<Esc>u" call assert_equal('R-Rx', g:current_modes) + " R_CTRL-X CTRL-P: Multiple matches exe "normal RBa\<C-X>\<C-P>\<F2>\<Esc>u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-P: Single match exe "normal RBro\<C-X>\<C-P>\<F2>\<Esc>u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-P + CTRL-P: Single match exe "normal RBro\<C-X>\<C-P>\<C-P>\<F2>\<Esc>u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-L: Multiple matches + exe "normal R\<C-X>\<C-L>\<F2>\<Esc>u" + call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-L: Single match + exe "normal RBlu\<C-X>\<C-L>\<F2>\<Esc>u" + call assert_equal('R-Rc', g:current_modes) + " R_CTRL-P: No match exe "normal RCom\<C-P>\<F2>\<Esc>u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-P: No match exe "normal RCom\<C-X>\<C-P>\<F2>\<Esc>u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-L: No match + exe "normal Rabc\<C-X>\<C-L>\<F2>\<Esc>u" + call assert_equal('R-Rc', g:current_modes) call assert_equal('n', mode(0)) call assert_equal('n', mode(1)) |