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)
diff --git a/src/testdir/test_charsearch.vim b/src/testdir/test_charsearch.vim
index 683bcab..e6301a5 100644
--- a/src/testdir/test_charsearch.vim
+++ b/src/testdir/test_charsearch.vim
@@ -29,6 +29,8 @@
   set cpo-=;
   normal! ;;p
   call assert_equal('ZabcdeZfghijkZZemnokqretkZvwxyz', getline(3))
+
+  call assert_fails("call setcharsearch([])", 'E715:')
   enew!
 endfunc