comparison src/testdir/test100.in @ 7279:b5e9810b389d v7.4.945

commit https://github.com/vim/vim/commit/683fa185a4b4ed7595e5942901548b8239ed5cdb Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 30 21:38:24 2015 +0100 patch 7.4.945 Problem: New style testing is incomplete. Solution: Add the runtest script to the list of distributed files. Add the new functions to the function overview. Rename the functions to match Vim function style. Move undolevels testing into a new style test script.
author Christian Brabandt <cb@256bit.org>
date Mon, 30 Nov 2015 21:45:04 +0100
parents 9d5b8b015e5f
children
comparison
equal deleted inserted replaced
7278:cbb385c32701 7279:b5e9810b389d
1 Tests for 'undolevel' and 'lispwords' settings being global-local 1 Tests for 'lispwords' settings being global-local
2 2
3 STARTTEST 3 STARTTEST
4 :so small.vim 4 :so small.vim
5 :set nocompatible viminfo+=nviminfo ul=5 5 :set nocompatible viminfo+=nviminfo
6 :fu! FillBuffer()
7 :for i in range(1,13)
8 :put=i
9 :exe "setg ul=" . &g:ul
10 :endfor
11 :endfu
12 :fu! UndoLevel()
13 :redir @a | setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |redir end
14 :$put a
15 :endfu
16 :new one
17 :0put ='ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'
18 :call FillBuffer()
19 :earlier 10
20 :call UndoLevel()
21 :set ff=unix
22 :%w! test.out
23 :new two
24 :0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
25 :setlocal ul=2
26 :call FillBuffer()
27 :earlier 10
28 :call UndoLevel()
29 :setlocal ul=10
30 :call UndoLevel()
31 :set ff=unix
32 :%w >> test.out
33 :wincmd p
34 :redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end
35 :new three
36 :setglobal ul=50
37 :1put ='global value should be changed to 50'
38 :2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
39 :call UndoLevel()
40 :set ff=unix
41 :%w >> test.out
42 :"sleep 10
43 :" 6 :"
44 :" Testing 'lispwords' 7 :" Testing 'lispwords'
45 :" 8 :"
46 :setglobal lispwords=foo,bar,baz 9 :setglobal lispwords=foo,bar,baz
47 :setlocal lispwords-=foo | setlocal lispwords+=quux 10 :setlocal lispwords-=foo | setlocal lispwords+=quux