Mercurial > vim
annotate src/testdir/test_bufwintabinfo.vim @ 10960:d7b78cbf85e4 v8.0.0369
patch 8.0.0369: a few options are not defined, depending on features
commit https://github.com/vim/vim/commit/c43a8b8de0676caf8a460b6af1310d7aba8221bb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 25 21:12:29 2017 +0100
patch 8.0.0369: a few options are not defined, depending on features
Problem: The 'balloondelay', 'ballooneval' and 'balloonexpr' options are
not defined without the +balloon_eval feature. Testing that an
option value fails does not work for unsupported options.
Solution: Make the options defined but not supported. Don't test if
setting unsupported options fails.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 25 Feb 2017 21:15:03 +0100 |
parents | 22e97a250277 |
children | 03a6aeea2096 |
rev | line source |
---|---|
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for the getbufinfo(), getwininfo() and gettabinfo() functions |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 function Test_getbufwintabinfo() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 1,$bwipeout |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 edit Xtestfile1 |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 edit Xtestfile2 |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 let buflist = getbufinfo() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 call assert_equal(2, len(buflist)) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 call assert_match('Xtestfile1', buflist[0].name) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 call assert_match('Xtestfile2', getbufinfo('Xtestfile2')[0].name) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 call assert_equal([], getbufinfo(2016)) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 edit Xtestfile1 |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 hide edit Xtestfile2 |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 hide enew |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 call assert_equal(3, len(getbufinfo({'bufloaded':1}))) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
17 set tabstop&vim |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
18 let b:editor = 'vim' |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
19 let l = getbufinfo('%') |
9904
24900147aa44
commit https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
Christian Brabandt <cb@256bit.org>
parents:
9883
diff
changeset
|
20 call assert_equal(bufnr('%'), l[0].bufnr) |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
21 call assert_equal('vim', l[0].variables.editor) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
22 call assert_notequal(-1, index(l[0].windows, bufwinid('%'))) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
23 |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
24 if has('signs') |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
25 call append(0, ['Linux', 'Windows', 'Mac']) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
26 sign define Mark text=>> texthl=Search |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
27 exe "sign place 2 line=3 name=Mark buffer=" . bufnr('%') |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
28 let l = getbufinfo('%') |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
29 call assert_equal(2, l[0].signs[0].id) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
30 call assert_equal(3, l[0].signs[0].lnum) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
31 call assert_equal('Mark', l[0].signs[0].name) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
32 sign unplace * |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
33 sign undefine Mark |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
34 enew! |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
35 endif |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
36 |
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 only |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 let w1_id = win_getid() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 new |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 let w2_id = win_getid() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 tabnew | let w3_id = win_getid() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 new | let w4_id = win_getid() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 new | let w5_id = win_getid() |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
44 call setwinvar(0, 'signal', 'green') |
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 tabfirst |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 let winlist = getwininfo() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 call assert_equal(5, len(winlist)) |
9904
24900147aa44
commit https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
Christian Brabandt <cb@256bit.org>
parents:
9883
diff
changeset
|
48 call assert_equal(winbufnr(2), winlist[1].bufnr) |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
49 call assert_equal(winheight(2), winlist[1].height) |
9904
24900147aa44
commit https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
Christian Brabandt <cb@256bit.org>
parents:
9883
diff
changeset
|
50 call assert_equal(1, winlist[2].winnr) |
24900147aa44
commit https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
Christian Brabandt <cb@256bit.org>
parents:
9883
diff
changeset
|
51 call assert_equal(2, winlist[3].tabnr) |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
52 call assert_equal('green', winlist[2].variables.signal) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
53 call assert_equal(winwidth(1), winlist[0].width) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
54 call assert_equal(w4_id, winlist[3].winid) |
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 let winfo = getwininfo(w5_id)[0] |
9904
24900147aa44
commit https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
Christian Brabandt <cb@256bit.org>
parents:
9883
diff
changeset
|
56 call assert_equal(2, winfo.tabnr) |
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 call assert_equal([], getwininfo(3)) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
59 call settabvar(1, 'space', 'build') |
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 let tablist = gettabinfo() |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 call assert_equal(2, len(tablist)) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 call assert_equal(3, len(tablist[1].windows)) |
9904
24900147aa44
commit https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
Christian Brabandt <cb@256bit.org>
parents:
9883
diff
changeset
|
63 call assert_equal(2, tablist[1].tabnr) |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
64 call assert_equal('build', tablist[0].variables.space) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
65 call assert_equal(w2_id, tablist[0].windows[0]) |
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 call assert_equal([], gettabinfo(3)) |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 |
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 tabonly | only |
9881
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
69 |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
70 lexpr '' |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
71 lopen |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
72 copen |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
73 let winlist = getwininfo() |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
74 call assert_false(winlist[0].quickfix) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
75 call assert_false(winlist[0].loclist) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
76 call assert_true(winlist[1].quickfix) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
77 call assert_true(winlist[1].loclist) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
78 call assert_true(winlist[2].quickfix) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
79 call assert_false(winlist[2].loclist) |
4b53f6be10c0
commit https://github.com/vim/vim/commit/386600f0cbcb8add099c723cf84634f46df2f788
Christian Brabandt <cb@256bit.org>
parents:
9858
diff
changeset
|
80 wincmd t | only |
9858
3e96d9ed2ca1
commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 endfunction |
10000
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
82 |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
83 function Test_get_buf_options() |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
84 let opts = getbufvar(bufnr('%'), '&') |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
85 call assert_equal(v:t_dict, type(opts)) |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
86 call assert_equal(8, opts.tabstop) |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
87 endfunc |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
88 |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
89 function Test_get_win_options() |
10205
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
90 if has('folding') |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
91 set foldlevel=999 |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
92 endif |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
93 set list |
10000
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
94 let opts = getwinvar(1, '&') |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
95 call assert_equal(v:t_dict, type(opts)) |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
96 call assert_equal(0, opts.linebreak) |
10205
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
97 call assert_equal(1, opts.list) |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
98 if has('folding') |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
99 call assert_equal(999, opts.foldlevel) |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
100 endif |
10000
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
101 if has('signs') |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
102 call assert_equal('auto', opts.signcolumn) |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
103 endif |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
104 |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
105 let opts = gettabwinvar(1, 1, '&') |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
106 call assert_equal(v:t_dict, type(opts)) |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
107 call assert_equal(0, opts.linebreak) |
10205
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
108 call assert_equal(1, opts.list) |
10000
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
109 if has('signs') |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
110 call assert_equal('auto', opts.signcolumn) |
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
111 endif |
10205
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
112 set list& |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
113 if has('folding') |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
114 set foldlevel=0 |
22e97a250277
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Christian Brabandt <cb@256bit.org>
parents:
10000
diff
changeset
|
115 endif |
10000
233289599874
commit https://github.com/vim/vim/commit/3056735ae8a366aa7fcb51872520895251858637
Christian Brabandt <cb@256bit.org>
parents:
9904
diff
changeset
|
116 endfunc |