summaryrefslogtreecommitdiff
path: root/src/testdir/test_quickfix.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-11 22:04:02 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-11 22:04:02 +0100
commit9f6277bdde97b7767ded43a0b5a2023eb601b3b7 (patch)
treef80204a06b9c411a154597c112f51d81a66d1d50 /src/testdir/test_quickfix.vim
parent799439a5d85a7d45eff7485056f2798cea766300 (diff)
downloadvim-git-9f6277bdde97b7767ded43a0b5a2023eb601b3b7.tar.gz
patch 8.2.0243: insufficient code coverage for ex_docmd.c functionsv8.2.0243
Problem: Insufficient code coverage for ex_docmd.c functions. Solution: Add more tests. (Yegappan Lakshmanan, closes #5618)
Diffstat (limited to 'src/testdir/test_quickfix.vim')
-rw-r--r--src/testdir/test_quickfix.vim19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 3f4574a12..cc5ee8066 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -2725,10 +2725,6 @@ func XvimgrepTests(cchar)
call assert_equal(0, getbufinfo('Xtestfile1')[0].loaded)
call assert_equal([], getbufinfo('Xtestfile2'))
- " Test with the last search pattern not set
- call test_clear_search_pat()
- call assert_fails('Xvimgrep // *', 'E35:')
-
call delete('Xtestfile1')
call delete('Xtestfile2')
endfunc
@@ -2754,6 +2750,21 @@ func Test_vimgrep_incsearch()
set noincsearch
endfunc
+" Test vimgrep with the last search pattern not set
+func Test_vimgrep_with_no_last_search_pat()
+ let lines =<< trim [SCRIPT]
+ call assert_fails('vimgrep // *', 'E35:')
+ call writefile(v:errors, 'Xresult')
+ qall!
+ [SCRIPT]
+ call writefile(lines, 'Xscript')
+ if RunVim([], [], '--clean -S Xscript')
+ call assert_equal([], readfile('Xresult'))
+ endif
+ call delete('Xscript')
+ call delete('Xresult')
+endfunc
+
func XfreeTests(cchar)
call s:setup_commands(a:cchar)