Mercurial > vim
annotate src/testdir/test91.in @ 10595:dbaad101b1e1 v8.0.0187
patch 8.0.0187: cant build with new Ruby version
commit https://github.com/vim/vim/commit/fe6ce331d94c24ad745d0bf329ec0a65a5c07cc9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 14 20:12:01 2017 +0100
patch 8.0.0187: cant build with new Ruby version
Problem: Building with a new Ruby version fails.
Solution: Use ruby_sysinit() instead of NtInitialize(). (Tomas Volf,
closes #1382)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 14 Jan 2017 20:15:05 +0100 |
parents | e8eccb9621f7 |
children | 5780bd3a5a7e |
rev | line source |
---|---|
4157 | 1 Tests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar(). |
2 vim: set ft=vim : | |
3 | |
4 STARTTEST | |
5 :so small.vim | |
5231
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
6 :so mbyte.vim |
4157 | 7 :" |
7042
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
8 :" Use strings to test for memory leaks. |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
9 :" First, check that in an empty window, gettabvar() returns the correct value |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
10 :let t:testvar='abcd' |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
11 :$put =string(gettabvar(1,'testvar')) |
e8eccb9621f7
commit https://github.com/vim/vim/commit/7e47d1ac6a9ae0e5a7167aa34ff651a9c39c1641
Christian Brabandt <cb@256bit.org>
parents:
6197
diff
changeset
|
12 :$put =string(gettabvar(1,'testvar')) |
4297 | 13 :" Test for getbufvar() |
14 :let b:var_num = '1234' | |
15 :let def_num = '5678' | |
4157 | 16 :$put =string(getbufvar(1, 'var_num')) |
17 :$put =string(getbufvar(1, 'var_num', def_num)) | |
18 :$put =string(getbufvar(1, '')) | |
19 :$put =string(getbufvar(1, '', def_num)) | |
20 :unlet b:var_num | |
21 :$put =string(getbufvar(1, 'var_num', def_num)) | |
22 :$put =string(getbufvar(1, '')) | |
23 :$put =string(getbufvar(1, '', def_num)) | |
24 :$put =string(getbufvar(9, '')) | |
25 :$put =string(getbufvar(9, '', def_num)) | |
26 :unlet def_num | |
27 :$put =string(getbufvar(1, '&autoindent')) | |
28 :$put =string(getbufvar(1, '&autoindent', 1)) | |
29 :" | |
5231
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
30 :" Open new window with forced option values |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
31 :set fileformats=unix,dos |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
32 :new ++ff=dos ++bin ++enc=iso-8859-2 |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
33 :let otherff = getbufvar(bufnr('%'), '&fileformat') |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
34 :let otherbin = getbufvar(bufnr('%'), '&bin') |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
35 :let otherfenc = getbufvar(bufnr('%'), '&fenc') |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
36 :close |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
37 :$put =otherff |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
38 :$put =string(otherbin) |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
39 :$put =otherfenc |
74d2f3188cd0
updated for version 7.4a.041
Bram Moolenaar <bram@vim.org>
parents:
4297
diff
changeset
|
40 :unlet otherff otherbin otherfenc |
4157 | 41 :" test for getwinvar() |
42 :let w:var_str = "Dance" | |
43 :let def_str = "Chance" | |
44 :$put =string(getwinvar(1, 'var_str')) | |
45 :$put =string(getwinvar(1, 'var_str', def_str)) | |
46 :$put =string(getwinvar(1, '')) | |
47 :$put =string(getwinvar(1, '', def_str)) | |
48 :unlet w:var_str | |
49 :$put =string(getwinvar(1, 'var_str', def_str)) | |
50 :$put =string(getwinvar(1, '')) | |
51 :$put =string(getwinvar(1, '', def_str)) | |
52 :$put =string(getwinvar(9, '')) | |
53 :$put =string(getwinvar(9, '', def_str)) | |
54 :$put =string(getwinvar(1, '&nu')) | |
55 :$put =string(getwinvar(1, '&nu', 1)) | |
56 :unlet def_str | |
57 :" | |
58 :" test for gettabvar() | |
59 :tabnew | |
60 :tabnew | |
61 :let t:var_list = [1, 2, 3] | |
6197 | 62 :let t:other = 777 |
4157 | 63 :let def_list = [4, 5, 6, 7] |
64 :tabrewind | |
65 :$put =string(gettabvar(3, 'var_list')) | |
66 :$put =string(gettabvar(3, 'var_list', def_list)) | |
67 :$put =string(gettabvar(3, '')) | |
68 :$put =string(gettabvar(3, '', def_list)) | |
69 :tablast | |
70 :unlet t:var_list | |
71 :tabrewind | |
72 :$put =string(gettabvar(3, 'var_list', def_list)) | |
73 :$put =string(gettabvar(9, '')) | |
74 :$put =string(gettabvar(9, '', def_list)) | |
75 :$put =string(gettabvar(3, '&nu')) | |
76 :$put =string(gettabvar(3, '&nu', def_list)) | |
77 :unlet def_list | |
78 :tabonly | |
79 :" | |
80 :" test for gettabwinvar() | |
81 :tabnew | |
82 :tabnew | |
83 :tabprev | |
84 :split | |
85 :split | |
86 :wincmd w | |
87 :vert split | |
88 :wincmd w | |
89 :let w:var_dict = {'dict': 'tabwin'} | |
90 :let def_dict = {'dict2': 'newval'} | |
91 :wincmd b | |
92 :tabrewind | |
93 :$put =string(gettabwinvar(2, 3, 'var_dict')) | |
94 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict)) | |
95 :$put =string(gettabwinvar(2, 3, '')) | |
96 :$put =string(gettabwinvar(2, 3, '', def_dict)) | |
97 :tabnext | |
98 :3wincmd w | |
99 :unlet w:var_dict | |
100 :tabrewind | |
101 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict)) | |
102 :$put =string(gettabwinvar(2, 3, '')) | |
103 :$put =string(gettabwinvar(2, 3, '', def_dict)) | |
104 :$put =string(gettabwinvar(2, 9, '')) | |
105 :$put =string(gettabwinvar(2, 9, '', def_dict)) | |
106 :$put =string(gettabwinvar(9, 3, '')) | |
107 :$put =string(gettabwinvar(9, 3, '', def_dict)) | |
108 :unlet def_dict | |
109 :$put =string(gettabwinvar(2, 3, '&nux')) | |
110 :$put =string(gettabwinvar(2, 3, '&nux', 1)) | |
111 :tabonly | |
112 :" | |
113 :/^start/,$wq! test.out | |
114 ENDTEST | |
115 | |
116 start: |