annotate src/testdir/test_set.vim @ 19724:b3e93a05c3ca v8.2.0418

patch 8.2.0418: code in eval.c not sufficiently covered by tests Commit: https://github.com/vim/vim/commit/8b633135106dda8605463b780573c45b00c22afe Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 20 18:20:51 2020 +0100 patch 8.2.0418: code in eval.c not sufficiently covered by tests Problem: Code in eval.c not sufficiently covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5815)
author Bram Moolenaar <Bram@vim.org>
date Fri, 20 Mar 2020 18:30:05 +0100
parents 779a7c14c795
children 08940efa6b4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7426
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Tests for the :set command
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 function Test_set_backslash()
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 let isk_save = &isk
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 set isk=a,b,c
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 set isk+=d
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 call assert_equal('a,b,c,d', &isk)
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 set isk+=\\,e
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 call assert_equal('a,b,c,d,\,e', &isk)
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 set isk-=e
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 call assert_equal('a,b,c,d,\', &isk)
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 set isk-=\\
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 call assert_equal('a,b,c,d', &isk)
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 let &isk = isk_save
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 endfunction
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 function Test_set_add()
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 let wig_save = &wig
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 set wildignore=*.png,
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 set wildignore+=*.jpg
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 call assert_equal('*.png,*.jpg', &wig)
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 let &wig = wig_save
779a7c14c795 commit https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 endfunction