0
0
mirror of https://github.com/vim/vim.git synced 2025-10-07 05:54:16 -04:00

patch 8.2.1736: failure to compile a pattern not tested much

Problem:    Failure to compile a pattern not tested much.
Solution:   Add tests where a pattern fails to compile. (Yegappan Lakshmanan,
            closes #7004)
This commit is contained in:
Bram Moolenaar
2020-09-23 22:38:05 +02:00
parent 851d108313
commit 531be47ac5
18 changed files with 47 additions and 1 deletions

View File

@@ -373,6 +373,7 @@ func Test_syntax_invalid_arg()
call AssertFails('syntax cluster contains=Abc', 'E400:')
call AssertFails("syntax match Character /'.'", 'E401:')
call AssertFails("syntax match Character /'.'/a", 'E402:')
call assert_fails('syntax sync linecont /\%(/', 'E53:')
call assert_fails('syntax sync linecont /pat', 'E404:')
call assert_fails('syntax sync linecont', 'E404:')
call assert_fails('syntax sync linecont /pat1/ linecont /pat2/', 'E403:')
@@ -382,6 +383,7 @@ func Test_syntax_invalid_arg()
call AssertFails('syntax match ccFoo "Foo" nextgroup=ALLBUT,F', 'E407:')
call AssertFails('syntax region Block start="{" contains=F,ALLBUT', 'E408:')
call AssertFails("syntax match Characters contains=a.*x /'.'/", 'E409:')
call assert_fails('syntax match Search /abc/ contains=ALLBUT,/\%(/', 'E53:')
endfunc
func Test_syn_sync()