annotate src/testdir/test91.in @ 4232:0fcb050fd79d v7.3.867

updated for version 7.3.867 Problem: Matchparen does not update match when using auto-indenting. (Marc Aldorasi) Solution: Add the TextChanged and TextChangedI autocommand events.
author Bram Moolenaar <bram@vim.org>
date Tue, 19 Mar 2013 13:33:23 +0100
parents cb185366f5c8
children aca1886102bd
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
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :" test for getbufvar()
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :let b:var_num = 1234
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :let def_num = 5678
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :$put =string(getbufvar(1, 'var_num'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 :$put =string(getbufvar(1, 'var_num', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 :$put =string(getbufvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :$put =string(getbufvar(1, '', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :unlet b:var_num
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 :$put =string(getbufvar(1, 'var_num', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 :$put =string(getbufvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :$put =string(getbufvar(1, '', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :$put =string(getbufvar(9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :$put =string(getbufvar(9, '', def_num))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :unlet def_num
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :$put =string(getbufvar(1, '&autoindent'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :$put =string(getbufvar(1, '&autoindent', 1))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :" test for getwinvar()
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :let w:var_str = "Dance"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :let def_str = "Chance"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :$put =string(getwinvar(1, 'var_str'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :$put =string(getwinvar(1, 'var_str', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :$put =string(getwinvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :$put =string(getwinvar(1, '', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :unlet w:var_str
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :$put =string(getwinvar(1, 'var_str', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :$put =string(getwinvar(1, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :$put =string(getwinvar(1, '', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :$put =string(getwinvar(9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :$put =string(getwinvar(9, '', def_str))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :$put =string(getwinvar(1, '&nu'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 :$put =string(getwinvar(1, '&nu', 1))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 :unlet def_str
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 :" test for gettabvar()
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 :let t:var_list = [1, 2, 3]
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 :let def_list = [4, 5, 6, 7]
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 :$put =string(gettabvar(3, 'var_list'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 :$put =string(gettabvar(3, 'var_list', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 :$put =string(gettabvar(3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 :$put =string(gettabvar(3, '', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 :tablast
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 :unlet t:var_list
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 :$put =string(gettabvar(3, 'var_list', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 :$put =string(gettabvar(9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 :$put =string(gettabvar(9, '', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 :$put =string(gettabvar(3, '&nu'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 :$put =string(gettabvar(3, '&nu', def_list))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 :unlet def_list
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 :tabonly
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 :" test for gettabwinvar()
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 :tabnew
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 :tabprev
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 :split
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 :split
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 :wincmd w
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 :vert split
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 :wincmd w
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 :let w:var_dict = {'dict': 'tabwin'}
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 :let def_dict = {'dict2': 'newval'}
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 :wincmd b
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 :$put =string(gettabwinvar(2, 3, 'var_dict'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 :$put =string(gettabwinvar(2, 3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 :$put =string(gettabwinvar(2, 3, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 :tabnext
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 :3wincmd w
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 :unlet w:var_dict
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 :tabrewind
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 :$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 :$put =string(gettabwinvar(2, 3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 :$put =string(gettabwinvar(2, 3, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 :$put =string(gettabwinvar(2, 9, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 :$put =string(gettabwinvar(2, 9, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 :$put =string(gettabwinvar(9, 3, ''))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 :$put =string(gettabwinvar(9, 3, '', def_dict))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 :unlet def_dict
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 :$put =string(gettabwinvar(2, 3, '&nux'))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 :$put =string(gettabwinvar(2, 3, '&nux', 1))
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 :tabonly
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 :"
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 :/^start/,$wq! test.out
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 ENDTEST
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97
cb185366f5c8 updated for version 7.3.831
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 start: