diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 8c580262ac..c32a3f03eb 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -1188,6 +1188,7 @@ endfunc func Test_cmdline_edit() let str = ":one two\" let str ..= "one two\\" + let str ..= "one\\\" let str ..= "\five\" let str ..= "\two " let str ..= "\one " @@ -1206,6 +1207,7 @@ func Test_cmdline_edit_rightleft() set rightleftcmd=search let str = "/one two\" let str ..= "one two\\" + let str ..= "one\\\" let str ..= "\five\" let str ..= "\two " let str ..= "\one " @@ -1233,4 +1235,37 @@ func Test_cmdline_expr() call assert_equal("\"e \\", @:) endfunc +" Test for 'imcmdline' and 'imsearch' +" This test doesn't actually test the input method functionality. +func Test_cmdline_inputmethod() + new + call setline(1, ['', 'abc', '']) + set imcmdline + + call feedkeys(":\"abc\", 'xt') + call assert_equal("\"abc", @:) + call feedkeys(":\"\abc\\", 'xt') + call assert_equal("\"abc", @:) + call feedkeys("/abc\", 'xt') + call assert_equal([2, 1], [line('.'), col('.')]) + call feedkeys("/\abc\\", 'xt') + call assert_equal([2, 1], [line('.'), col('.')]) + + set imsearch=2 + call cursor(1, 1) + call feedkeys("/abc\", 'xt') + call assert_equal([2, 1], [line('.'), col('.')]) + call cursor(1, 1) + call feedkeys("/\abc\\", 'xt') + call assert_equal([2, 1], [line('.'), col('.')]) + set imdisable + call feedkeys("/\abc\\", 'xt') + call assert_equal([2, 1], [line('.'), col('.')]) + set imdisable& + set imsearch& + + set imcmdline& + %bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim index 91ba012e15..e88bdf5302 100644 --- a/src/testdir/test_ex_mode.vim +++ b/src/testdir/test_ex_mode.vim @@ -49,6 +49,8 @@ func Test_ex_mode() call assert_equal([' foo', ' foo'], Ex(" foo\"), e) call assert_equal(['foo', ' foo0'], Ex(" foo0\"), e) call assert_equal(['foo', ' foo^'], Ex(" foo^\"), e) + call assert_equal(['foo', 'foo'], + \ Ex("\\\foo"), e) endfor set sw& @@ -128,4 +130,13 @@ func Test_Ex_escape_enter() call assert_equal("a\rb", l) endfunc +" Test for :append! command in Ex mode +func Test_Ex_append() + new + call setline(1, "\t abc") + call feedkeys("Qappend!\npqr\nxyz\n.\nvisual\n", 'xt') + call assert_equal(["\t abc", "\t pqr", "\t xyz"], getline(1, '$')) + close! +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_history.vim b/src/testdir/test_history.vim index 96006ac7e7..0312b5f579 100644 --- a/src/testdir/test_history.vim +++ b/src/testdir/test_history.vim @@ -114,6 +114,7 @@ function Test_Search_history_window() bwipe! endfunc +" Test for :history command option completion function Test_history_completion() call feedkeys(":history \\\"\", 'tx') call assert_equal('"history / : = > ? @ all cmd debug expr input search', @:) @@ -122,8 +123,9 @@ endfunc " Test for increasing the 'history' option value func Test_history_size() let save_histsz = &history - call histdel(':') set history=10 + call histadd(':', 'ls') + call histdel(':') for i in range(1, 5) call histadd(':', 'cmd' .. i) endfor @@ -173,6 +175,13 @@ func Test_history_search() call assert_equal(['pat2', 'pat1', ''], g:pat) cunmap delfunc SavePat + + " Recall patterns with 'history' set to 0 + set history=0 + let @/ = 'abc' + let cmd = 'call feedkeys("/\\\\\", "xt")' + call assert_fails(cmd, 'E486:') + set history& endfunc " Test for making sure the key value is not stored in history diff --git a/src/testdir/test_iminsert.vim b/src/testdir/test_iminsert.vim index fb2ef053bd..1880662af2 100644 --- a/src/testdir/test_iminsert.vim +++ b/src/testdir/test_iminsert.vim @@ -62,3 +62,5 @@ func Test_getimstatus() set imactivatefunc= set imstatusfunc= endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index d927b4e8c1..6ecd281ac7 100644 --- a/src/version.c +++ b/src/version.c @@ -738,6 +738,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 342, /**/ 341, /**/