1
0
forked from aniani/vim

patch 8.2.0448: various functions not properly tested

Problem:    Various functions not properly tested.
Solution:   Add more tests, especially for failures. (Yegappan Lakshmanan,
            closes #5843)
This commit is contained in:
Bram Moolenaar
2020-03-25 22:23:46 +01:00
parent bfcfd5784a
commit 0e05de4622
26 changed files with 190 additions and 1 deletions

View File

@@ -1385,6 +1385,15 @@ func Test_search_match_at_curpos()
close!
endfunc
" Test for error cases with the search() function
func Test_search_errors()
call assert_fails("call search('pat', [])", 'E730:')
call assert_fails("call search('pat', 'b', {})", 'E728:')
call assert_fails("call search('pat', 'b', 1, [])", 'E745:')
call assert_fails("call search('pat', 'ns')", 'E475:')
call assert_fails("call search('pat', 'mr')", 'E475:')
endfunc
func Test_search_display_pattern()
new
call setline(1, ['foo', 'bar', 'foobar'])