aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-04 08:40:54 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-04 08:44:19 -0400
commit21aa4bc428e439e7132474aee646552c9b0d6b63 (patch)
treea2632436414a1b32396155c8cf96365e641d0021 /src/nvim/testdir
parentfe5c891fe05b7974c9a7c9048b81e788f1143eb1 (diff)
downloadrneovim-21aa4bc428e439e7132474aee646552c9b0d6b63.tar.gz
rneovim-21aa4bc428e439e7132474aee646552c9b0d6b63.tar.bz2
rneovim-21aa4bc428e439e7132474aee646552c9b0d6b63.zip
vim-patch:8.0.0623: error for invalid regexp is not very informative
Problem: The message "Invalid range" is used for multiple errors. Solution: Add two more specific error messages. (Itchyny, Ken Hamada) https://github.com/vim/vim/commit/966e58e413ffa88af8d748e697aa2999571fcd7b
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_regexp_utf8.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim
index 0e4a9f647a..97638e9aac 100644
--- a/src/nvim/testdir/test_regexp_utf8.vim
+++ b/src/nvim/testdir/test_regexp_utf8.vim
@@ -166,3 +166,20 @@ func Test_eow_with_optional()
call assert_equal(expected, actual)
endfor
endfunc
+
+func Test_reversed_range()
+ for re in range(0, 2)
+ exe 'set re=' . re
+ call assert_fails('call match("abc def", "[c-a]")', 'E944:')
+ endfor
+ set re=0
+endfunc
+
+func Test_large_class()
+ set re=1
+ call assert_fails('call match("abc def", "[\u3000-\u4000]")', 'E945:')
+ set re=2
+ call assert_equal(0, 'abc def' =~# '[\u3000-\u4000]')
+ call assert_equal(1, "\u3042" =~# '[\u3000-\u4000]')
+ set re=0
+endfunc