changeset 10626:37b1197fdd6f

patch 8.0.0202: no test for invalid syntax group name commit https://github.com/vim/vim/commit/4007ed4a5e8c34197078e9d5718bd1d4a429dd23 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 17 18:14:54 2017 +0100 patch 8.0.0202: no test for invalid syntax group name Problem: No test for invalid syntax group name. Solution: Add a test for group name error and warning.
author Christian Brabandt <cb@256bit.org>
date Tue, 17 Jan 2017 18:15:04 +0100
parents 3120f15cfff7
children fb9c28aca006
files src/testdir/test_syntax.vim src/version.c
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_syntax.vim
+++ b/src/testdir/test_syntax.vim
@@ -335,3 +335,14 @@ func Test_syn_clear()
   hi clear Foo
   hi clear Bar
 endfunc
+
+func Test_invalid_name()
+  syn clear
+  syn keyword Nop yes
+  call assert_fails("syntax keyword Wr\x17ong bar", 'E669:')
+  syntax keyword @Wrong bar
+  call assert_match('W18:', execute('1messages'))
+  syn clear
+  hi clear Nop
+  hi clear @Wrong
+endfunc
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    202,
+/**/
     201,
 /**/
     200,