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:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user