@@ -186,6 +186,10 @@ func Test_syntax_arg_skipped()
186186 call assert_match (' conceal on' , execute (' syntax conceal' ))
187187 syn clear
188188 call assert_match (' conceal off' , execute (' syntax conceal' ))
189+
190+ syntax conceal on
191+ syntax conceal off
192+ call assert_match (' conceal off' , execute (' syntax conceal' ))
189193 endif
190194
191195 syntax region Tar start =/ </ end =/ >/
@@ -283,8 +287,7 @@ func Test_syntax_arg_skipped()
283287 endif
284288 call assert_match (' on C-style comments' , execute (' syntax sync' ))
285289 call assert_match (' maximal 5 lines' , execute (' syntax sync' ))
286- syn clear
287- syn keyword Foo foo
290+ syn sync clear
288291 if 0
289292 syn sync ccomment
290293 endif
@@ -293,3 +296,30 @@ func Test_syntax_arg_skipped()
293296 syn clear
294297endfunc
295298
299+ func Test_invalid_arg ()
300+ call assert_fails (' syntax case asdf' , ' E390:' )
301+ call assert_fails (' syntax conceal asdf' , ' E390:' )
302+ call assert_fails (' syntax spell asdf' , ' E390:' )
303+ endfunc
304+
305+ func Test_syn_sync ()
306+ syntax region HereGroup start =/ this/ end =/ that/
307+ syntax sync match SyncHere grouphere HereGroup " pattern"
308+ call assert_match (' SyncHere' , execute (' syntax sync' ))
309+ syn sync clear
310+ call assert_notmatch (' SyncHere' , execute (' syntax sync' ))
311+ syn clear
312+ endfunc
313+
314+ func Test_syn_clear ()
315+ syntax keyword Foo foo
316+ syntax keyword Tar tar
317+ call assert_match (' Foo' , execute (' syntax' ))
318+ call assert_match (' Tar' , execute (' syntax' ))
319+ syn clear Foo
320+ call assert_notmatch (' Foo' , execute (' syntax' ))
321+ call assert_match (' Tar' , execute (' syntax' ))
322+ syn clear Foo Tar
323+ call assert_notmatch (' Foo' , execute (' syntax' ))
324+ call assert_notmatch (' Tar' , execute (' syntax' ))
325+ endfunc
0 commit comments