blob: 8e53c917650bcd1dee38df324e2b87e7ed33004b [file] [log] [blame]
Bram Moolenaar00154502013-02-13 16:15:55 +01001Some tests for setting 'number' and 'relativenumber'
Bram Moolenaar5ebc09b2013-06-04 22:13:50 +02002This is not all that useful now that the options are no longer reset when
3setting the other.
Bram Moolenaar00154502013-02-13 16:15:55 +01004
5STARTTEST
Bram Moolenaarcaca92b2013-02-14 20:10:33 +01006:so small.vim
Bram Moolenaar2ab07132013-04-24 15:47:15 +02007:set hidden nocp nu rnu viminfo+=nviminfo
Bram Moolenaar00154502013-02-13 16:15:55 +01008:redir @a | set nu? rnu? | redir END
9:e! xx
10:redir @b | set nu? rnu? | redir END
11:e! #
12:$put ='results:'
13:$put a
14:$put b
Bram Moolenaar20754022013-03-13 20:42:32 +010015:"
16:set nonu nornu
17:setglobal nu
18:setlocal rnu
19:redir @c | setglobal nu? | redir END
20:set nonu nornu
21:setglobal rnu
22:setlocal nu
23:redir @d | setglobal rnu? | redir END
24:$put =':setlocal must NOT reset the other global value'
25:$put c
26:$put d
27:"
28:set nonu nornu
29:setglobal nu
30:setglobal rnu
31:redir @e | setglobal nu? | redir END
32:set nonu nornu
33:setglobal rnu
34:setglobal nu
35:redir @f | setglobal rnu? | redir END
36:$put =':setglobal MUST reset the other global value'
37:$put e
38:$put f
39:"
40:set nonu nornu
41:set nu
42:set rnu
43:redir @g | setglobal nu? | redir END
44:set nonu nornu
45:set rnu
46:set nu
47:redir @h | setglobal rnu? | redir END
48:$put =':set MUST reset the other global value'
49:$put g
50:$put h
51:"
Bram Moolenaar00154502013-02-13 16:15:55 +010052:/^results/,$w! test.out
53:q!
54ENDTEST
55