patch 8.2.2837: various code lines not covered by tests

Problem:    Various code lines not covered by tests.
Solution:   Add test cases. (Dominique Pellé, closes #8178)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 1cce8a0..936a2d0 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1148,7 +1148,9 @@
   call assert_equal(2, charidx(a, 4))
   call assert_equal(3, charidx(a, 7))
   call assert_equal(-1, charidx(a, 8))
+  call assert_equal(-1, charidx(a, -1))
   call assert_equal(-1, charidx('', 0))
+  call assert_equal(-1, charidx(test_null_string(), 0))
 
   " count composing characters
   call assert_equal(0, charidx(a, 0, 1))