annotate src/testdir/test100.in @ 5925:fed2e0967f81 v7.4.304

updated for version 7.4.304 Problem: Cannot always use Python with Vim. Solution: Add the manifest to the executable. (Jacques Germishuys)
author Bram Moolenaar <bram@vim.org>
date Thu, 22 May 2014 16:29:06 +0200
parents 06e5f65c34d8
children 1134bba900c1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5712
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
1 Tests for 'undolevel' and 'lispwords' settings being global-local
5450
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :set nocompatible viminfo+=nviminfo ul=5
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :fu! FillBuffer()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :for i in range(1,13)
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :put=i
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :exe "setg ul=" . &g:ul
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :endfor
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 :endfu
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 :fu! UndoLevel()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :redir @a | setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |redir end
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :$put a
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 :endfu
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 :new one
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :0put ='ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :call FillBuffer()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :call feedkeys(":earlier 10\n", 't')
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :call UndoLevel()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :%w! test.out
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :new two
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :setlocal ul=2
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :call FillBuffer()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :call feedkeys(":earlier 10\n", 't')
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :call UndoLevel()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :setlocal ul=10
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :call UndoLevel()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :%w >> test.out
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :wincmd p
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :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
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :new three
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :setglobal ul=50
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :1put ='global value should be changed to 50'
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :call UndoLevel()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 :%w >> test.out
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 :"sleep 10
5712
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
40 :"
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
41 :" Testing 'lispwords'
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
42 :"
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
43 :setglobal lispwords=foo,bar,baz
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
44 :setlocal lispwords-=foo | setlocal lispwords+=quux
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
45 :redir >> test.out | echon "\nTesting 'lispwords' local value" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
46 :setlocal lispwords<
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
47 :redir >> test.out | echon "\nTesting 'lispwords' value reset" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
5450
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 :qa!
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 ENDTEST
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50