Mercurial > vim
annotate src/testdir/test_man.vim @ 31192:dcde141f2d1e v9.0.0930
patch 9.0.0930: cannot debug the Kitty keyboard protocol with TermDebug
Commit: https://github.com/vim/vim/commit/63a2e360cca2c70ab0a85d14771d3259d4b3aafa
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 23 20:20:18 2022 +0000
patch 9.0.0930: cannot debug the Kitty keyboard protocol with TermDebug
Problem: Cannot debug the Kitty keyboard protocol with TermDebug.
Solution: Add Kitty keyboard protocol support to the libvterm fork.
Recognize the escape sequences that the protocol generates. Add
the 'keyprotocol' option to allow the user to specify for which
terminal what protocol is to be used, instead of hard-coding this.
Add recognizing the kitty keyboard protocol status.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Nov 2022 21:30:04 +0100 |
parents | 3aaaa65dcf6e |
children |
rev | line source |
---|---|
20025
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
1 " Test specifically for the Man filetype plugin. |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
2 |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 runtime ftplugin/man.vim |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
17541
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
5 func Test_g_ft_man_open_mode() |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 vnew |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 let l:h = winheight(1) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 q |
9636
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
9 let l:w = winwidth(1) |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 " split horizontally |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 let wincnt = winnr('$') |
9636
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
13 Man vim |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 if wincnt == winnr('$') |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 " Vim manual page cannot be found. |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 return |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 endif |
9636
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
18 |
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
19 call assert_inrange(l:w - 2, l:w + 2, winwidth(1)) |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 call assert_true(l:h > winheight(1)) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 call assert_equal(1, tabpagenr('$')) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 call assert_equal(1, tabpagenr()) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 q |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 " split horizontally |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 let g:ft_man_open_mode = "horz" |
9636
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
27 Man vim |
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
28 call assert_inrange(l:w - 2, l:w + 2, winwidth(1)) |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call assert_true(l:h > winheight(1)) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 call assert_equal(1, tabpagenr('$')) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 call assert_equal(1, tabpagenr()) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 q |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 " split vertically |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 let g:ft_man_open_mode = "vert" |
9636
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
36 Man vim |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 call assert_true(l:w > winwidth(1)) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 call assert_equal(l:h, winheight(1)) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 call assert_equal(1, tabpagenr('$')) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 call assert_equal(1, tabpagenr()) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 q |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 " separate tab |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 let g:ft_man_open_mode = "tab" |
9636
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
45 Man vim |
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
46 call assert_inrange(l:w - 2, l:w + 2, winwidth(1)) |
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
47 call assert_inrange(l:h - 1, l:h + 1, winheight(1)) |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 call assert_equal(2, tabpagenr('$')) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 call assert_equal(2, tabpagenr()) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 q |
17470
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
51 |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
52 unlet g:ft_man_open_mode |
17541
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
53 endfunc |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 |
17541
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
55 func Test_nomodifiable() |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 let wincnt = winnr('$') |
9636
ccbb8e393d80
commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78
Christian Brabandt <cb@256bit.org>
parents:
9326
diff
changeset
|
57 Man vim |
9326
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 if wincnt == winnr('$') |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 " Vim manual page cannot be found. |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 return |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 endif |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 call assert_false(&l:modifiable) |
cd9c4bbe1d03
commit https://github.com/vim/vim/commit/ddf8d1c746ee081d15c9d7e0515f6ac43adbf363
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 q |
17541
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
64 endfunc |
17470
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
65 |
17541
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
66 func Test_buffer_count_hidden() |
17470
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
67 %bw! |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
68 set hidden |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
69 |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
70 call assert_equal(1, len(getbufinfo())) |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
71 |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
72 let wincnt = winnr('$') |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
73 Man vim |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
74 if wincnt == winnr('$') |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
75 " Vim manual page cannot be found. |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
76 return |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
77 endif |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
78 |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
79 call assert_equal(1, len(getbufinfo({'buflisted':1}))) |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
80 call assert_equal(2, len(getbufinfo())) |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
81 q |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
82 |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
83 Man vim |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
84 |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
85 call assert_equal(1, len(getbufinfo({'buflisted':1}))) |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
86 call assert_equal(2, len(getbufinfo())) |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
87 q |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
88 |
d2a834aa7cc0
patch 8.1.1733: the man ftplugin leaves an empty buffer behind
Bram Moolenaar <Bram@vim.org>
parents:
9636
diff
changeset
|
89 set hidden& |
17541
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
90 endfunc |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
91 |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
92 " Check that we do not alter the settings in the initial window. |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
93 func Test_local_options() |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
94 %bw! |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
95 set foldcolumn=1 number |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
96 |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
97 let wincnt = winnr('$') |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
98 Man vim |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
99 if wincnt == winnr('$') |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
100 " Vim manual page cannot be found. |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
101 return |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
102 endif |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
103 |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
104 " man page |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
105 call assert_false(&nu) |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
106 call assert_equal(0, &fdc) |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
107 |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
108 " initial window |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
109 wincmd p |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
110 call assert_true(&nu) |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
111 call assert_equal(1, &fdc) |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
112 |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
113 %bw! |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
114 set foldcolumn& number& |
d9aa921b7198
patch 8.1.1768: man plugin changes setting in current window
Bram Moolenaar <Bram@vim.org>
parents:
17470
diff
changeset
|
115 endfunc |
20025
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
116 |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
117 " Check that the unnamed register is not overwritten. |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
118 func Test_keep_unnamed_register() |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
119 %bw! |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
120 |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
121 let @" = '---' |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
122 |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
123 let wincnt = winnr('$') |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
124 Man vim |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
125 if wincnt == winnr('$') |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
126 " Vim manual page cannot be found. |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
127 return |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
128 endif |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
129 |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
130 call assert_equal('---', @") |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
131 |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
132 %bw! |
18043e7ab449
patch 8.2.0568: the man filetype plugin overwrites the unnamed register
Bram Moolenaar <Bram@vim.org>
parents:
17541
diff
changeset
|
133 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20025
diff
changeset
|
134 |
22738
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
135 " Check that underlying shell command arguments are escaped. |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
136 func Test_Man_uses_shellescape() |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
137 Man `touch\ Xbar` `touch\ Xfoo` |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
138 |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
139 redir => msg |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
140 1messages |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
141 redir END |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
142 call assert_match('no manual entry for "`touch Xfoo`"', msg) |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
143 |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
144 call assert_false(filereadable('Xbar')) |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
145 call assert_false(filereadable('Xfoo')) |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
146 endfunc |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
147 |
3aaaa65dcf6e
patch 8.2.1917: no test for improved Man command
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
148 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20025
diff
changeset
|
149 " vim: shiftwidth=2 sts=2 expandtab |