diff options
| author | watiko <service@mail.watiko.net> | 2016-02-17 03:24:54 +0900 |
|---|---|---|
| committer | watiko <service@mail.watiko.net> | 2016-03-06 00:32:39 +0900 |
| commit | c78aeb0d467f0cca48c3741c7766790e28646450 (patch) | |
| tree | 6ece4088ab7bdcfadc03914a43ec25fbd409ee27 /src/nvim/testdir | |
| parent | 0e9f7a7b36901842d9cdbe8cd00db47b74ab799b (diff) | |
| download | rneovim-c78aeb0d467f0cca48c3741c7766790e28646450.tar.gz rneovim-c78aeb0d467f0cca48c3741c7766790e28646450.tar.bz2 rneovim-c78aeb0d467f0cca48c3741c7766790e28646450.zip | |
vim-patch:7.4.941
Problem: There is no way to ignore case only for tag searches.
Solution: Add the 'tagcase' option. (Gary Johnson)
https://github.com/vim/vim/commit/0f6562e9036f889185dff49a75c7fc5ffb28b307
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_tagcase.in | 55 | ||||
| -rw-r--r-- | src/nvim/testdir/test_tagcase.ok | 76 |
3 files changed, 132 insertions, 0 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 63ca4cf6c4..2e01c636a3 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -38,6 +38,7 @@ SCRIPTS := \ test_close_count.out \ test_marks.out \ test_match_conceal.out \ + test_tagcase.out \ NEW_TESTS = diff --git a/src/nvim/testdir/test_tagcase.in b/src/nvim/testdir/test_tagcase.in new file mode 100644 index 0000000000..322d7696af --- /dev/null +++ b/src/nvim/testdir/test_tagcase.in @@ -0,0 +1,55 @@ +Tests for 'tagcase' option + +STARTTEST +:/^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 diff --git a/src/nvim/testdir/test_tagcase.ok b/src/nvim/testdir/test_tagcase.ok new file mode 100644 index 0000000000..fe161cf387 --- /dev/null +++ b/src/nvim/testdir/test_tagcase.ok @@ -0,0 +1,76 @@ +ic=0 g:tc=followic l:tc=followic tc=followic + +E474: Invalid argument: tc= +E474: Invalid argument: tc= +ic=0 g:tc=followic l:tc= tc=followic +1 +1 +ic=0 g:tc=followic l:tc=followic tc=followic +1 +1 +ic=0 g:tc=followic l:tc=ignore tc=ignore +2 +2 +ic=0 g:tc=followic l:tc=match tc=match +1 +1 +ic=0 g:tc=ignore l:tc= tc=ignore +2 +2 +ic=0 g:tc=ignore l:tc=followic tc=followic +1 +1 +ic=0 g:tc=ignore l:tc=ignore tc=ignore +2 +2 +ic=0 g:tc=ignore l:tc=match tc=match +1 +1 +ic=0 g:tc=match l:tc= tc=match +1 +1 +ic=0 g:tc=match l:tc=followic tc=followic +1 +1 +ic=0 g:tc=match l:tc=ignore tc=ignore +2 +2 +ic=0 g:tc=match l:tc=match tc=match +1 +1 +ic=1 g:tc=followic l:tc= tc=followic +2 +2 +ic=1 g:tc=followic l:tc=followic tc=followic +2 +2 +ic=1 g:tc=followic l:tc=ignore tc=ignore +2 +2 +ic=1 g:tc=followic l:tc=match tc=match +1 +1 +ic=1 g:tc=ignore l:tc= tc=ignore +2 +2 +ic=1 g:tc=ignore l:tc=followic tc=followic +2 +2 +ic=1 g:tc=ignore l:tc=ignore tc=ignore +2 +2 +ic=1 g:tc=ignore l:tc=match tc=match +1 +1 +ic=1 g:tc=match l:tc= tc=match +1 +1 +ic=1 g:tc=match l:tc=followic tc=followic +2 +2 +ic=1 g:tc=match l:tc=ignore tc=ignore +2 +2 +ic=1 g:tc=match l:tc=match tc=match +1 +1 |