diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-01 16:53:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-01 16:53:09 +0100 |
commit | 0546d7df13b041833121b2d56036e1c62ea3b0c1 (patch) | |
tree | 7cd0a13998c53f0d310c8d6478cb19a2ae628dc6 /src/testdir/test_history.vim | |
parent | 41fe061753923986e6676424132960d970bb2a76 (diff) |
patch 8.2.0342: some code in ex_getln.c not covered by testsv8.2.0342
Problem: Some code in ex_getln.c not covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closes #5717)
Diffstat (limited to 'src/testdir/test_history.vim')
-rw-r--r-- | src/testdir/test_history.vim | 11 |
1 files changed, 10 insertions, 1 deletions
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 \<C-A>\<C-B>\"\<CR>", '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 <F2> delfunc SavePat + + " Recall patterns with 'history' set to 0 + set history=0 + let @/ = 'abc' + let cmd = 'call feedkeys("/\<Up>\<Down>\<S-Up>\<S-Down>\<CR>", "xt")' + call assert_fails(cmd, 'E486:') + set history& endfunc " Test for making sure the key value is not stored in history |