blob: fc3a9a29b50ec1c7d6a2a00d4547af24abd1a23b [file] [log] [blame]
Bram Moolenaarf4c5fcb2013-07-03 17:14:00 +02001- Some tests for setting 'number' and 'relativenumber'
2 This is not all that useful now that the options are no longer reset when
3 setting the other.
4- Some tests for findfile() function
Bram Moolenaar00154502013-02-13 16:15:55 +01005
6STARTTEST
Bram Moolenaarcaca92b2013-02-14 20:10:33 +01007:so small.vim
Bram Moolenaar2ab07132013-04-24 15:47:15 +02008:set hidden nocp nu rnu viminfo+=nviminfo
Bram Moolenaar00154502013-02-13 16:15:55 +01009:redir @a | set nu? rnu? | redir END
10:e! xx
11:redir @b | set nu? rnu? | redir END
12:e! #
13:$put ='results:'
14:$put a
15:$put b
Bram Moolenaar20754022013-03-13 20:42:32 +010016:"
17:set nonu nornu
18:setglobal nu
19:setlocal rnu
20:redir @c | setglobal nu? | redir END
21:set nonu nornu
22:setglobal rnu
23:setlocal nu
24:redir @d | setglobal rnu? | redir END
25:$put =':setlocal must NOT reset the other global value'
26:$put c
27:$put d
28:"
29:set nonu nornu
30:setglobal nu
31:setglobal rnu
32:redir @e | setglobal nu? | redir END
33:set nonu nornu
34:setglobal rnu
35:setglobal nu
36:redir @f | setglobal rnu? | redir END
37:$put =':setglobal MUST reset the other global value'
38:$put e
39:$put f
40:"
41:set nonu nornu
42:set nu
43:set rnu
44:redir @g | setglobal nu? | redir END
45:set nonu nornu
46:set rnu
47:set nu
48:redir @h | setglobal rnu? | redir END
49:$put =':set MUST reset the other global value'
50:$put g
51:$put h
52:"
Bram Moolenaarf4c5fcb2013-07-03 17:14:00 +020053:let cwd=getcwd()
54:cd ../..
55:$put =''
56:$put ='Testing findfile'
57:$put =''
58:$put =findfile('test19.in','src/test*')
59:exe "cd" cwd
60:cd ..
61:$put =findfile('test19.in','test*')
62:$put =findfile('test19.in','testdir')
63:exe "cd" cwd
Bram Moolenaar00154502013-02-13 16:15:55 +010064:/^results/,$w! test.out
65:q!
66ENDTEST
67