blob: 122165d4f07cb9e12e884f6e4bbf4ef7ddb9ceec [file] [log] [blame]
Bram Moolenaar00154502013-02-13 16:15:55 +01001Some tests for setting 'number' and 'relativenumber'
2
3STARTTEST
Bram Moolenaarcaca92b2013-02-14 20:10:33 +01004:so small.vim
Bram Moolenaar00154502013-02-13 16:15:55 +01005:set hidden nocp nu rnu
6:redir @a | set nu? rnu? | redir END
7:e! xx
8:redir @b | set nu? rnu? | redir END
9:e! #
10:$put ='results:'
11:$put a
12:$put b
Bram Moolenaar20754022013-03-13 20:42:32 +010013:"
14:set nonu nornu
15:setglobal nu
16:setlocal rnu
17:redir @c | setglobal nu? | redir END
18:set nonu nornu
19:setglobal rnu
20:setlocal nu
21:redir @d | setglobal rnu? | redir END
22:$put =':setlocal must NOT reset the other global value'
23:$put c
24:$put d
25:"
26:set nonu nornu
27:setglobal nu
28:setglobal rnu
29:redir @e | setglobal nu? | redir END
30:set nonu nornu
31:setglobal rnu
32:setglobal nu
33:redir @f | setglobal rnu? | redir END
34:$put =':setglobal MUST reset the other global value'
35:$put e
36:$put f
37:"
38:set nonu nornu
39:set nu
40:set rnu
41:redir @g | setglobal nu? | redir END
42:set nonu nornu
43:set rnu
44:set nu
45:redir @h | setglobal rnu? | redir END
46:$put =':set MUST reset the other global value'
47:$put g
48:$put h
49:"
Bram Moolenaar00154502013-02-13 16:15:55 +010050:/^results/,$w! test.out
51:q!
52ENDTEST
53