comparison src/testdir/test_quickfix.vim @ 19370:02111977dd05 v8.2.0243

patch 8.2.0243: insufficient code coverage for ex_docmd.c functions Commit: https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 11 22:04:02 2020 +0100 patch 8.2.0243: insufficient code coverage for ex_docmd.c functions Problem: Insufficient code coverage for ex_docmd.c functions. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5618)
author Bram Moolenaar <Bram@vim.org>
date Tue, 11 Feb 2020 22:15:04 +0100
parents 102f9a44c8b3
children 2f4be7ca1b1b
comparison
equal deleted inserted replaced
19369:05c259d4233d 19370:02111977dd05
2723 %bwipe 2723 %bwipe
2724 Xvimgrep /Editor/j Xtestfile* 2724 Xvimgrep /Editor/j Xtestfile*
2725 call assert_equal(0, getbufinfo('Xtestfile1')[0].loaded) 2725 call assert_equal(0, getbufinfo('Xtestfile1')[0].loaded)
2726 call assert_equal([], getbufinfo('Xtestfile2')) 2726 call assert_equal([], getbufinfo('Xtestfile2'))
2727 2727
2728 " Test with the last search pattern not set
2729 call test_clear_search_pat()
2730 call assert_fails('Xvimgrep // *', 'E35:')
2731
2732 call delete('Xtestfile1') 2728 call delete('Xtestfile1')
2733 call delete('Xtestfile2') 2729 call delete('Xtestfile2')
2734 endfunc 2730 endfunc
2735 2731
2736 " Tests for the :vimgrep command 2732 " Tests for the :vimgrep command
2750 let l = getqflist() 2746 let l = getqflist()
2751 call assert_equal(2, len(l)) 2747 call assert_equal(2, len(l))
2752 2748
2753 call test_override("ALL", 0) 2749 call test_override("ALL", 0)
2754 set noincsearch 2750 set noincsearch
2751 endfunc
2752
2753 " Test vimgrep with the last search pattern not set
2754 func Test_vimgrep_with_no_last_search_pat()
2755 let lines =<< trim [SCRIPT]
2756 call assert_fails('vimgrep // *', 'E35:')
2757 call writefile(v:errors, 'Xresult')
2758 qall!
2759 [SCRIPT]
2760 call writefile(lines, 'Xscript')
2761 if RunVim([], [], '--clean -S Xscript')
2762 call assert_equal([], readfile('Xresult'))
2763 endif
2764 call delete('Xscript')
2765 call delete('Xresult')
2755 endfunc 2766 endfunc
2756 2767
2757 func XfreeTests(cchar) 2768 func XfreeTests(cchar)
2758 call s:setup_commands(a:cchar) 2769 call s:setup_commands(a:cchar)
2759 2770