annotate src/testdir/test_man.vim @ 31431:552ca9b4218d v9.0.1048

patch 9.0.1048: with "screenline" in 'culopt' cursorline highlight is wrong Commit: https://github.com/vim/vim/commit/b7acea1806996a9afb9fb8ebfe571b5181063070 Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Dec 12 13:20:43 2022 +0000 patch 9.0.1048: with "screenline" in 'culopt' cursorline highlight is wrong Problem: With "screenline" in 'culopt' cursorline highlight is wrong. Solution: Apply the priority logic also when "screenline is in 'culopt'. (closes #11696)
author Bram Moolenaar <Bram@vim.org>
date Mon, 12 Dec 2022 14:30:05 +0100
parents 3aaaa65dcf6e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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