patch 8.1.0945: internal error when using pattern with NL in the range

Problem:    Internal error when using pattern with NL in the range.
Solution:   Use an actual newline for the range. (closes #3989)  Also fix
            error message.  (Dominique Pelle)
diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim
index d30312a..d603acd 100644
--- a/src/testdir/test_regexp_latin.vim
+++ b/src/testdir/test_regexp_latin.vim
@@ -122,3 +122,11 @@
   bwipe!
   set re=0
 endfunc
+
+func Test_range_with_newline()
+  new
+  call setline(1, "a")
+  call assert_equal(0, search("[ -*\\n- ]"))
+  call assert_equal(0, search("[ -*\\t-\\n]"))
+  bwipe!
+endfunc