annotate runtime/doc/testing.txt @ 21741:baccf9e06efe v8.2.1420

patch 8.2.1420: test 49 is old style Commit: https://github.com/vim/vim/commit/f7c4d83609acdfe0e4d0fec9413697ac97c0c3f9 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 11 20:42:19 2020 +0200 patch 8.2.1420: test 49 is old style Problem: Test 49 is old style. Solution: Convert remaining parts to new style. Remove obsolete items. (Yegappan Lakshmanan, closes #6683)
author Bram Moolenaar <Bram@vim.org>
date Tue, 11 Aug 2020 20:45:05 +0200
parents 3a1ed539ae2a
children 30bdd2e4a6f9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21499
3a1ed539ae2a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21265
diff changeset
1 *testing.txt* For Vim version 8.2. Last change: 2020 Jul 11
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 VIM REFERENCE MANUAL by Bram Moolenaar
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 Testing Vim and Vim script *testing-support*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 Expression evaluation is explained in |eval.txt|. This file goes into details
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 about writing tests in Vim script. This can be used for testing Vim itself
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 and for testing plugins.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 1. Testing Vim |testing|
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17456
diff changeset
14 2. Test functions |test-functions-details|
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17456
diff changeset
15 3. Assert functions |assert-functions-details|
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 ==============================================================================
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 1. Testing Vim *testing*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 Vim can be tested after building it, usually with "make test".
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 The tests are located in the directory "src/testdir".
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 *new-style-testing*
21741
baccf9e06efe patch 8.2.1420: test 49 is old style
Bram Moolenaar <Bram@vim.org>
parents: 21499
diff changeset
24 New tests should be added as new style tests. The test scripts are named
baccf9e06efe patch 8.2.1420: test 49 is old style
Bram Moolenaar <Bram@vim.org>
parents: 21499
diff changeset
25 test_<feature>.vim (replace <feature> with the feature under test). These use
baccf9e06efe patch 8.2.1420: test 49 is old style
Bram Moolenaar <Bram@vim.org>
parents: 21499
diff changeset
26 functions such as |assert_equal()| to keep the test commands and the expected
baccf9e06efe patch 8.2.1420: test 49 is old style
Bram Moolenaar <Bram@vim.org>
parents: 21499
diff changeset
27 result in one place.
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 Find more information in the file src/testdir/README.txt.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 ==============================================================================
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17456
diff changeset
32 2. Test functions *test-functions-details*
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 This is for testing: If the memory allocation with {id} is
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 called, then decrement {countdown}, and when it reaches zero
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 let memory allocation fail {repeat} times. When {repeat} is
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 smaller than one it fails one time.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
40 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
41 GetAllocId()->test_alloc_fail()
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 test_autochdir() *test_autochdir()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 Set a flag to enable the effect of 'autochdir' before Vim
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 startup has finished.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 test_feedinput({string}) *test_feedinput()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 Characters in {string} are queued for processing as if they
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 were typed by the user. This uses a low level input buffer.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 This function works only when with |+unix| or GUI is running.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
53 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
54 GetText()->test_feedinput()
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 test_garbagecollect_now() *test_garbagecollect_now()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 Like garbagecollect(), but executed right away. This must
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 only be called directly to avoid any structure to exist
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 internally, and |v:testing| must have been set before calling
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 any function.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 test_garbagecollect_soon() *test_garbagecollect_soon()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 Set the flag to call the garbagecollector as if in the main
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 loop. Only to be used in tests.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 test_getvalue({name}) *test_getvalue()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 Get the value of an internal variable. These values for
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 {name} are supported:
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 need_fileinfo
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
73 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
74 GetName()->test_getvalue()
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 test_ignore_error({expr}) *test_ignore_error()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 Ignore any error containing {expr}. A normal message is given
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 instead.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 This is only meant to be used in tests, where catching the
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 error with try/catch cannot be used (because it skips over
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 following code).
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 {expr} is used literally, not as a pattern.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 When the {expr} is the string "RESET" then the list of ignored
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 errors is made empty.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
86 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
87 GetErrorText()->test_ignore_error()
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 test_null_blob() *test_null_blob()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 Return a |Blob| that is null. Only useful for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93 test_null_channel() *test_null_channel()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 Return a |Channel| that is null. Only useful for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95 {only available when compiled with the +channel feature}
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98 test_null_dict() *test_null_dict()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99 Return a |Dict| that is null. Only useful for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101
19874
f92435f0f449 patch 8.2.0493: Vim9: some error messages not tested
Bram Moolenaar <Bram@vim.org>
parents: 19523
diff changeset
102 test_null_function() *test_null_function()*
19968
1908e92b02fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 19874
diff changeset
103 Return a |Funcref| that is null. Only useful for testing.
19874
f92435f0f449 patch 8.2.0493: Vim9: some error messages not tested
Bram Moolenaar <Bram@vim.org>
parents: 19523
diff changeset
104
f92435f0f449 patch 8.2.0493: Vim9: some error messages not tested
Bram Moolenaar <Bram@vim.org>
parents: 19523
diff changeset
105
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 test_null_job() *test_null_job()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 Return a |Job| that is null. Only useful for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108 {only available when compiled with the +job feature}
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 test_null_list() *test_null_list()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 Return a |List| that is null. Only useful for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 test_null_partial() *test_null_partial()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116 Return a |Partial| that is null. Only useful for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
117
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
119 test_null_string() *test_null_string()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
120 Return a |String| that is null. Only useful for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
121
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
122
19483
0d3dcb4476ba patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Bram Moolenaar <Bram@vim.org>
parents: 19404
diff changeset
123 test_unknown() *test_unknown()*
0d3dcb4476ba patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Bram Moolenaar <Bram@vim.org>
parents: 19404
diff changeset
124 Return a value with unknown type. Only useful for testing.
0d3dcb4476ba patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Bram Moolenaar <Bram@vim.org>
parents: 19404
diff changeset
125
0d3dcb4476ba patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Bram Moolenaar <Bram@vim.org>
parents: 19404
diff changeset
126 test_void() *test_void()*
0d3dcb4476ba patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Bram Moolenaar <Bram@vim.org>
parents: 19404
diff changeset
127 Return a value with void type. Only useful for testing.
0d3dcb4476ba patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Bram Moolenaar <Bram@vim.org>
parents: 19404
diff changeset
128
0d3dcb4476ba patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Bram Moolenaar <Bram@vim.org>
parents: 19404
diff changeset
129
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
130 test_option_not_set({name}) *test_option_not_set()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
131 Reset the flag that indicates option {name} was set. Thus it
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
132 looks like it still has the default value. Use like this: >
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
133 set ambiwidth=double
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
134 call test_option_not_set('ambiwidth')
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
135 < Now the 'ambiwidth' option behaves like it was never changed,
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
136 even though the value is "double".
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
137 Only to be used for testing!
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
138
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
139 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
140 GetOptionName()->test_option_not_set()
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
141
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
142
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
143 test_override({name}, {val}) *test_override()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
144 Overrides certain parts of Vim's internal processing to be able
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
145 to run tests. Only to be used for testing Vim!
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
146 The override is enabled when {val} is non-zero and removed
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
147 when {val} is zero.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
148 Current supported values for name are:
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
149
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
150 name effect when {val} is non-zero ~
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
151 redraw disable the redrawing() function
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
152 redraw_flag ignore the RedrawingDisabled flag
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
153 char_avail disable the char_avail() function
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
154 starting reset the "starting" variable, see below
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
155 nfa_fail makes the NFA regexp engine fail to force a
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
156 fallback to the old engine
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
157 no_query_mouse do not query the mouse position for "dec"
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
158 terminals
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
159 no_wait_return set the "no_wait_return" flag. Not restored
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
160 with "ALL".
20861
1725bb56178a patch 8.2.0982: insufficient testing for reading/writing files
Bram Moolenaar <Bram@vim.org>
parents: 20856
diff changeset
161 ui_delay time in msec to use in ui_delay(); overrules a
1725bb56178a patch 8.2.0982: insufficient testing for reading/writing files
Bram Moolenaar <Bram@vim.org>
parents: 20856
diff changeset
162 wait time of up to 3 seconds for messages
20836
2616c5a337e0 patch 8.2.0970: terminal properties are not available in Vim script
Bram Moolenaar <Bram@vim.org>
parents: 20753
diff changeset
163 term_props reset all terminal properties when the version
2616c5a337e0 patch 8.2.0970: terminal properties are not available in Vim script
Bram Moolenaar <Bram@vim.org>
parents: 20753
diff changeset
164 string is detected
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
165 ALL clear all overrides ({val} is not used)
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
166
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
167 "starting" is to be used when a test should behave like
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
168 startup was done. Since the tests are run by sourcing a
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
169 script the "starting" variable is non-zero. This is usually a
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
170 good thing (tests run faster), but sometimes changes behavior
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
171 in a way that the test doesn't work properly.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
172 When using: >
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
173 call test_override('starting', 1)
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
174 < The value of "starting" is saved. It is restored by: >
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
175 call test_override('starting', 0)
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
176
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
177 < Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
178 GetOverrideVal()-> test_override('starting')
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
179
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
180 test_refcount({expr}) *test_refcount()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
181 Return the reference count of {expr}. When {expr} is of a
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
182 type that does not have a reference count, returns -1. Only
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
183 to be used for testing.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
184
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
185 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
186 GetVarname()->test_refcount()
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
187
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
188
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
189 test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
190 Pretend using scrollbar {which} to move it to position
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
191 {value}. {which} can be:
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
192 left Left scrollbar of the current window
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
193 right Right scrollbar of the current window
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
194 hor Horizontal scrollbar
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
195
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
196 For the vertical scrollbars {value} can be 1 to the
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
197 line-count of the buffer. For the horizontal scrollbar the
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
198 {value} can be between 1 and the maximum line length, assuming
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
199 'wrap' is not set.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
200
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
201 When {dragging} is non-zero it's like dragging the scrollbar,
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
202 otherwise it's like clicking in the scrollbar.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
203 Only works when the {which} scrollbar actually exists,
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
204 obviously only when using the GUI.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
205
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
206 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
207 GetValue()->test_scrollbar('right', 0)
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
208
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
209 test_setmouse({row}, {col}) *test_setmouse()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
210 Set the mouse position to be used for the next mouse action.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
211 {row} and {col} are one based.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
212 For example: >
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
213 call test_setmouse(4, 20)
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
214 call feedkeys("\<LeftMouse>", "xt")
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
215
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
216 test_settime({expr}) *test_settime()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
217 Set the time Vim uses internally. Currently only used for
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
218 timestamps in the history, as they are used in viminfo, and
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
219 for undo.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
220 Using a value of 1 makes Vim not sleep after a warning or
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
221 error message.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
222 {expr} must evaluate to a number. When the value is zero the
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
223 normal behavior is restored.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
224
18031
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
225 Can also be used as a |method|: >
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
226 GetTime()->test_settime()
8a2fb21c23c0 patch 8.1.2011: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17909
diff changeset
227
19350
76cb39bf1871 patch 8.2.0233: crash when using garbagecollect() in between rand()
Bram Moolenaar <Bram@vim.org>
parents: 19308
diff changeset
228 test_srand_seed([seed]) *test_srand_seed()*
76cb39bf1871 patch 8.2.0233: crash when using garbagecollect() in between rand()
Bram Moolenaar <Bram@vim.org>
parents: 19308
diff changeset
229 When [seed] is given this sets the seed value used by
76cb39bf1871 patch 8.2.0233: crash when using garbagecollect() in between rand()
Bram Moolenaar <Bram@vim.org>
parents: 19308
diff changeset
230 `srand()`. When omitted the test seed is removed.
76cb39bf1871 patch 8.2.0233: crash when using garbagecollect() in between rand()
Bram Moolenaar <Bram@vim.org>
parents: 19308
diff changeset
231
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
232 ==============================================================================
17571
2704c4e3e20a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17456
diff changeset
233 3. Assert functions *assert-functions-details*
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
234
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
235
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
236 assert_beeps({cmd}) *assert_beeps()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
237 Run {cmd} and add an error message to |v:errors| if it does
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
238 NOT produce a beep or visual bell.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
239 Also see |assert_fails()| and |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
240
17728
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
241 Can also be used as a |method|: >
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
242 GetCmd()->assert_beeps()
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
243 <
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
244 *assert_equal()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
245 assert_equal({expected}, {actual} [, {msg}])
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
246 When {expected} and {actual} are not equal an error message is
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
247 added to |v:errors| and 1 is returned. Otherwise zero is
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
248 returned |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
249 There is no automatic conversion, the String "4" is different
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
250 from the Number 4. And the number 4 is different from the
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
251 Float 4.0. The value of 'ignorecase' is not used here, case
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
252 always matters.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
253 When {msg} is omitted an error in the form "Expected
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
254 {expected} but got {actual}" is produced.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
255 Example: >
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
256 assert_equal('foo', 'bar')
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
257 < Will result in a string to be added to |v:errors|:
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
258 test.vim line 12: Expected 'foo' but got 'bar' ~
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
259
21250
21fb2a3ad3ca Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 20965
diff changeset
260 Can also be used as a |method|, the base is passed as the
21fb2a3ad3ca Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 20965
diff changeset
261 second argument: >
17620
072efa9ca875 patch 8.1.1807: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
262 mylist->assert_equal([1, 2, 3])
072efa9ca875 patch 8.1.1807: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
263
072efa9ca875 patch 8.1.1807: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
264 < *assert_equalfile()*
20679
1af1d8ff2aa8 patch 8.2.0893: assert_equalfile() does not take a third argument
Bram Moolenaar <Bram@vim.org>
parents: 19968
diff changeset
265 assert_equalfile({fname-one}, {fname-two} [, {msg}])
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
266 When the files {fname-one} and {fname-two} do not contain
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
267 exactly the same text an error message is added to |v:errors|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
268 Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
269 When {fname-one} or {fname-two} does not exist the error will
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
270 mention that.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
271 Mainly useful with |terminal-diff|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
272
17825
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
273 Can also be used as a |method|: >
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
274 GetLog()->assert_equalfile('expected.log')
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
275
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
276 assert_exception({error} [, {msg}]) *assert_exception()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
277 When v:exception does not contain the string {error} an error
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
278 message is added to |v:errors|. Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
279 This can be used to assert that a command throws an exception.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
280 Using the error number, followed by a colon, avoids problems
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
281 with translations: >
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
282 try
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
283 commandthatfails
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
284 call assert_false(1, 'command should have failed')
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
285 catch
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
286 call assert_exception('E492:')
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
287 endtry
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
288
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
289 assert_fails({cmd} [, {error} [, {msg}]]) *assert_fails()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
290 Run {cmd} and add an error message to |v:errors| if it does
21265
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
291 NOT produce an error or when {error} is not found in the
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
292 error message. Also see |assert-return|.
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
293
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
294 When {error} is a string it must be found literally in the
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
295 first reported error. Most often this will be the error code,
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
296 including the colon, e.g. "E123:". >
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
297 assert_fails('bad cmd', 'E987:')
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
298 <
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
299 When {error} is a |List| with one or two strings, these are
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
300 used as patterns. The first pattern is matched against the
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
301 first reported error: >
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
302 assert_fails('cmd', ['E987:.*expected bool'])
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
303 < The second pattern, if present, is matched against the last
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
304 reported error. To only match the last error use an empty
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
305 string for the first error: >
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
306 assert_fails('cmd', ['', 'E987:'])
6a4806e326dd patch 8.2.1183: assert_fails() checks the last error message
Bram Moolenaar <Bram@vim.org>
parents: 21250
diff changeset
307 <
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
308 Note that beeping is not considered an error, and some failing
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
309 commands only beep. Use |assert_beeps()| for those.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
310
17728
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
311 Can also be used as a |method|: >
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
312 GetCmd()->assert_fails('E99:')
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
313
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
314 assert_false({actual} [, {msg}]) *assert_false()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
315 When {actual} is not false an error message is added to
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
316 |v:errors|, like with |assert_equal()|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
317 Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
318 A value is false when it is zero. When {actual} is not a
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
319 number the assert fails.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
320 When {msg} is omitted an error in the form
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
321 "Expected False but got {actual}" is produced.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
322
17728
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
323 Can also be used as a |method|: >
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
324 GetResult()->assert_false()
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
325
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
326 assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
327 This asserts number and |Float| values. When {actual} is lower
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
328 than {lower} or higher than {upper} an error message is added
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
329 to |v:errors|. Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
330 When {msg} is omitted an error in the form
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
331 "Expected range {lower} - {upper}, but got {actual}" is
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
332 produced.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
333
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
334 *assert_match()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
335 assert_match({pattern}, {actual} [, {msg}])
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
336 When {pattern} does not match {actual} an error message is
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
337 added to |v:errors|. Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
338
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
339 {pattern} is used as with |=~|: The matching is always done
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
340 like 'magic' was set and 'cpoptions' is empty, no matter what
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
341 the actual value of 'magic' or 'cpoptions' is.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
342
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
343 {actual} is used as a string, automatic conversion applies.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
344 Use "^" and "$" to match with the start and end of the text.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
345 Use both to match the whole text.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
346
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
347 When {msg} is omitted an error in the form
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
348 "Pattern {pattern} does not match {actual}" is produced.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
349 Example: >
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
350 assert_match('^f.*o$', 'foobar')
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
351 < Will result in a string to be added to |v:errors|:
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
352 test.vim line 12: Pattern '^f.*o$' does not match 'foobar' ~
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
353
17728
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
354 Can also be used as a |method|: >
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
355 getFile()->assert_match('foo.*')
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
356 <
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
357 *assert_notequal()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
358 assert_notequal({expected}, {actual} [, {msg}])
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
359 The opposite of `assert_equal()`: add an error message to
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
360 |v:errors| when {expected} and {actual} are equal.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
361 Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
362
17620
072efa9ca875 patch 8.1.1807: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
363 Can also be used as a |method|: >
072efa9ca875 patch 8.1.1807: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
364 mylist->assert_notequal([1, 2, 3])
072efa9ca875 patch 8.1.1807: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
365
072efa9ca875 patch 8.1.1807: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17571
diff changeset
366 < *assert_notmatch()*
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
367 assert_notmatch({pattern}, {actual} [, {msg}])
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
368 The opposite of `assert_match()`: add an error message to
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
369 |v:errors| when {pattern} matches {actual}.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
370 Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
371
17728
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
372 Can also be used as a |method|: >
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
373 getFile()->assert_notmatch('bar.*')
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
374
17825
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
375
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
376 assert_report({msg}) *assert_report()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
377 Report a test failure directly, using {msg}.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
378 Always returns one.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
379
17825
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
380 Can also be used as a |method|: >
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
381 GetMessage()->assert_report()
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
382
ce993ba17adb patch 8.1.1909: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents: 17758
diff changeset
383
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
384 assert_true({actual} [, {msg}]) *assert_true()*
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
385 When {actual} is not true an error message is added to
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
386 |v:errors|, like with |assert_equal()|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
387 Also see |assert-return|.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
388 A value is TRUE when it is a non-zero number. When {actual}
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
389 is not a number the assert fails.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
390 When {msg} is omitted an error in the form "Expected True but
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
391 got {actual}" is produced.
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
392
17728
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
393 Can also be used as a |method|: >
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
394 GetResult()->assert_true()
68ea27d26d5b patch 8.1.1861: only some assert functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17620
diff changeset
395 <
17456
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
396
e414281d8bb4 patch 8.1.1726: the eval.txt help file is too big
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
397 vim:tw=78:ts=8:noet:ft=help:norl: