comparison src/testdir/test_syntax.vim @ 21765:08940efa6b4e v8.2.1432

patch 8.2.1432: various inconsistencies in test files Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 12 18:50:36 2020 +0200 patch 8.2.1432: various inconsistencies in test files Problem: Various inconsistencies in test files. Solution: Add modelines where they were missing. Use Check commands instead of silently skipping over tests. Adjust indents and comments. (Ken Takata, closes #6695)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Aug 2020 19:00:08 +0200
parents 6a4806e326dd
children ff21e2962490
comparison
equal deleted inserted replaced
21764:476b6faad407 21765:08940efa6b4e
82 call assert_true(exists('g:gotit')) 82 call assert_true(exists('g:gotit'))
83 call delete('Xsomefile') 83 call delete('Xsomefile')
84 endfunc 84 endfunc
85 85
86 func Test_syntime() 86 func Test_syntime()
87 if !has('profile') 87 CheckFeature profile
88 return
89 endif
90 88
91 syntax on 89 syntax on
92 syntime on 90 syntime on
93 let a = execute('syntime report') 91 let a = execute('syntime report')
94 call assert_equal("\nNo Syntax items defined for this buffer", a) 92 call assert_equal("\nNo Syntax items defined for this buffer", a)
117 115
118 bd 116 bd
119 endfunc 117 endfunc
120 118
121 func Test_syntime_completion() 119 func Test_syntime_completion()
122 if !has('profile') 120 CheckFeature profile
123 return
124 endif
125 121
126 call feedkeys(":syntime \<C-A>\<C-B>\"\<CR>", 'tx') 122 call feedkeys(":syntime \<C-A>\<C-B>\"\<CR>", 'tx')
127 call assert_equal('"syntime clear off on report', @:) 123 call assert_equal('"syntime clear off on report', @:)
128 endfunc 124 endfunc
129 125
496 492
497 hi Normal ctermbg=NONE 493 hi Normal ctermbg=NONE
498 endfunc 494 endfunc
499 495
500 func Test_syntax_hangs() 496 func Test_syntax_hangs()
501 if !has('reltime') || !has('float') || !has('syntax') 497 CheckFunction reltimefloat
502 return 498 CheckFeature syntax
503 endif
504 499
505 " This pattern takes a long time to match, it should timeout. 500 " This pattern takes a long time to match, it should timeout.
506 new 501 new
507 call setline(1, ['aaa', repeat('abc ', 1000), 'ccc']) 502 call setline(1, ['aaa', repeat('abc ', 1000), 'ccc'])
508 let start = reltime() 503 let start = reltime()
530 set redrawtime& 525 set redrawtime&
531 bwipe! 526 bwipe!
532 endfunc 527 endfunc
533 528
534 func Test_conceal() 529 func Test_conceal()
535 if !has('conceal') 530 CheckFeature conceal
536 return
537 endif
538 531
539 new 532 new
540 call setline(1, ['', '123456']) 533 call setline(1, ['', '123456'])
541 syn match test23 "23" conceal cchar=X 534 syn match test23 "23" conceal cchar=X
542 syn match test45 "45" conceal 535 syn match test45 "45" conceal