Mercurial > vim
view src/testdir/test_tagcase.vim @ 34644:9b94748e226a
runtime(java): Update java[CR]_JavaLang type lists (#14297)
Commit: https://github.com/vim/vim/commit/63d68c2c218eeb80c164e1c56c53f51a9e92a5eb
Author: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Date: Tue Mar 26 20:12:05 2024 +0300
runtime(java): Update java[CR]_JavaLang type lists (https://github.com/vim/vim/issues/14297)
- Add to the list of java.lang runtime exceptions two new
types: MatchException (Pattern Matching for _switch_) and
WrongThreadException (Virtual Threads).
- "Demote" Compiler (removed in JDK 21) from the list of
java.lang class types to a new list javaLangDeprecated.
References:
https://bugs.openjdk.org/browse/JDK-8205129
https://bugs.openjdk.org/browse/JDK-8282274
https://bugs.openjdk.org/browse/JDK-8284161
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 26 Mar 2024 18:15:08 +0100 |
parents | c8ebe35b2475 |
children |
line wrap: on
line source
" test 'tagcase' option func Test_tagcase() call writefile(["Bar\tXtext\t3", "Foo\tXtext\t2", "foo\tXtext\t4"], 'Xtags', 'D') set tags=Xtags e Xtext for &ic in [0, 1] for &scs in [0, 1] for &g:tc in ["followic", "ignore", "match", "followscs", "smart"] for &l:tc in ["", "followic", "ignore", "match", "followscs", "smart"] let smart = 0 if &l:tc != '' let tc = &l:tc else let tc = &g:tc endif if tc == 'followic' let ic = &ic elseif tc == 'ignore' let ic = 1 elseif tc == 'followscs' let ic = &ic let smart = &scs elseif tc == 'smart' let ic = 1 let smart = 1 else let ic = 0 endif if ic && smart call assert_equal(['foo', 'Foo'], map(taglist("^foo$"), {i, v -> v.name})) call assert_equal(['Foo'], map(taglist("^Foo$"), {i, v -> v.name})) elseif ic call assert_equal(['foo', 'Foo'], map(taglist("^foo$"), {i, v -> v.name})) call assert_equal(['Foo', 'foo'], map(taglist("^Foo$"), {i, v -> v.name})) else call assert_equal(['foo'], map(taglist("^foo$"), {i, v -> v.name})) call assert_equal(['Foo'], map(taglist("^Foo$"), {i, v -> v.name})) endif endfor endfor endfor endfor set tags& set ic& setg tc& setl tc& set scs& endfunc func Test_set_tagcase() " Verify default values. set ic& setg tc& setl tc& call assert_equal(0, &ic) call assert_equal('followic', &g:tc) call assert_equal('followic', &l:tc) call assert_equal('followic', &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. setl tc= call assert_fails('setg tc=', 'E474:') call assert_fails('set tc=', 'E474:') set ic& setg tc& setl tc& endfunc " vim: shiftwidth=2 sts=2 expandtab