Mercurial > vim
view src/testdir/test_tagcase.in @ 8907:5deb9e8f4292 v7.4.1740
commit https://github.com/vim/vim/commit/4d585022023b96f6507e8cae5ed8fc8d926f5140
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 14 19:50:22 2016 +0200
patch 7.4.1740
Problem: syn-cchar defined with matchadd() does not appear if there are no
other syntax definitions which matches buffer text.
Solution: Check for startcol. (Ozaki Kiichi, haya14busa, closes https://github.com/vim/vim/issues/757)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 14 Apr 2016 20:00:07 +0200 |
parents | 88f9d339026b |
children |
line wrap: on
line source
Tests for 'tagcase' option STARTTEST :so small.vim :lang mess C :/^start text$/+1,/^end text$/w! Xtext :/^start tags$/+1,/^end tags$/-1w! Xtags :set tags=Xtags :e Xtext :" :" Verify default values. :set ic& | setg tc& | setl tc& :call append('$', "ic=".&ic." g:tc=".&g:tc." l:tc=".&l:tc." tc=".&tc) :" :" Verify that the local setting accepts <empty> but that the global setting :" does not. The first of these (setting the local value to <empty>) should :" succeed; the other two should fail. :let v:errmsg = "" :setl tc= :call append('$', v:errmsg) :let v:errmsg = "" :setg tc= :call append('$', v:errmsg) :let v:errmsg = "" :set tc= :call append('$', v:errmsg) :" :" Verify that the correct number of matching tags is found for all values of :" 'ignorecase' and global and local values 'tagcase', in all combinations. :for &ic in [0, 1] : for &g:tc in ["followic", "ignore", "match"] : for &l:tc in ["", "followic", "ignore", "match"] : call append('$', "ic=".&ic." g:tc=".&g:tc." l:tc=".&l:tc." tc=".&tc) : call append('$', len(taglist("^foo$"))) : call append('$', len(taglist("^Foo$"))) : endfor : endfor :endfor :" :1,/^end text$/d :w! test.out :qa! ENDTEST start text Foo Bar foo end text start tags Bar Xtext 3 Foo Xtext 2 foo Xtext 4 end tags