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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4157
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar().
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 vim: set ft=vim :
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 STARTTEST
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
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
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
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
aca1886102bd updated for version 7.3.898
Bram Moolenaar <bram@vim.org>
parents: 4157
diff changeset
13 :" Test for getbufvar()
aca1886102bd updated for version 7.3.898
Bram Moolenaar <bram@vim.org>
parents: 4157
diff changeset
14 :let b:var_num = '1234'
aca1886102bd updated for version 7.3.898
Bram Moolenaar <bram@vim.org>
parents: 4157
diff changeset
15 :let def_num = '5678'
4157
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 :$put =string(getbufvar(1, 'var_num'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :$put =string(getbufvar(1, 'var_num', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :$put =string(getbufvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :$put =string(getbufvar(1, '', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :unlet b:var_num
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :$put =string(getbufvar(1, 'var_num', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :$put =string(getbufvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :$put =string(getbufvar(1, '', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :$put =string(getbufvar(9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :$put =string(getbufvar(9, '', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :unlet def_num
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :$put =string(getbufvar(1, '&autoindent'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :$put =string(getbufvar(1, '&autoindent', 1))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
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
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 :" test for getwinvar()
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 :let w:var_str = "Dance"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 :let def_str = "Chance"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 :$put =string(getwinvar(1, 'var_str'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 :$put =string(getwinvar(1, 'var_str', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 :$put =string(getwinvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 :$put =string(getwinvar(1, '', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 :unlet w:var_str
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 :$put =string(getwinvar(1, 'var_str', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 :$put =string(getwinvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 :$put =string(getwinvar(1, '', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 :$put =string(getwinvar(9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 :$put =string(getwinvar(9, '', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 :$put =string(getwinvar(1, '&nu'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 :$put =string(getwinvar(1, '&nu', 1))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 :unlet def_str
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 :" test for gettabvar()
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 :let t:var_list = [1, 2, 3]
6197
4176c48c7dd5 updated for version 7.4.434
Bram Moolenaar <bram@vim.org>
parents: 5231
diff changeset
62 :let t:other = 777
4157
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 :let def_list = [4, 5, 6, 7]
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 :$put =string(gettabvar(3, 'var_list'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 :$put =string(gettabvar(3, 'var_list', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 :$put =string(gettabvar(3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 :$put =string(gettabvar(3, '', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 :tablast
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 :unlet t:var_list
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 :$put =string(gettabvar(3, 'var_list', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 :$put =string(gettabvar(9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 :$put =string(gettabvar(9, '', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 :$put =string(gettabvar(3, '&nu'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 :$put =string(gettabvar(3, '&nu', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 :unlet def_list
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 :tabonly
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 :" test for gettabwinvar()
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 :tabprev
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 :split
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 :split
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 :wincmd w
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 :vert split
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 :wincmd w
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 :let w:var_dict = {'dict': 'tabwin'}
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 :let def_dict = {'dict2': 'newval'}
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 :wincmd b
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 :$put =string(gettabwinvar(2, 3, 'var_dict'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 :$put =string(gettabwinvar(2, 3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 :$put =string(gettabwinvar(2, 3, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 :tabnext
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 :3wincmd w
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 :unlet w:var_dict
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 :$put =string(gettabwinvar(2, 3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 :$put =string(gettabwinvar(2, 3, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 :$put =string(gettabwinvar(2, 9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 :$put =string(gettabwinvar(2, 9, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 :$put =string(gettabwinvar(9, 3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 :$put =string(gettabwinvar(9, 3, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 :unlet def_dict
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 :$put =string(gettabwinvar(2, 3, '&nux'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 :$put =string(gettabwinvar(2, 3, '&nux', 1))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 :tabonly
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 :/^start/,$wq! test.out
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
114 ENDTEST
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
115
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 start: