annotate src/testdir/test100.in @ 6749:57e81ce74c06 v7.4.697

patch 7.4.697 Problem: The filename used for ":profile" must be given literally. Solution: Expand "~" and environment variables. (Marco Hinz)
author Bram Moolenaar <bram@vim.org>
date Mon, 13 Apr 2015 15:37:56 +0200
parents 9d5b8b015e5f
children b5e9810b389d
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()
6272
9d5b8b015e5f updated for version 7.4.470
Bram Moolenaar <bram@vim.org>
parents: 6136
diff changeset
19 :earlier 10
5450
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :call UndoLevel()
6136
1134bba900c1 updated for version 7.4.406
Bram Moolenaar <bram@vim.org>
parents: 5712
diff changeset
21 :set ff=unix
5450
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :%w! test.out
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :new two
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :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
25 :setlocal ul=2
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :call FillBuffer()
6272
9d5b8b015e5f updated for version 7.4.470
Bram Moolenaar <bram@vim.org>
parents: 6136
diff changeset
27 :earlier 10
5450
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :call UndoLevel()
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :setlocal ul=10
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :call UndoLevel()
6136
1134bba900c1 updated for version 7.4.406
Bram Moolenaar <bram@vim.org>
parents: 5712
diff changeset
31 :set ff=unix
5450
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :%w >> test.out
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :wincmd p
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
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
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :new three
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :setglobal ul=50
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :1put ='global value should be changed to 50'
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 :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
39 :call UndoLevel()
6136
1134bba900c1 updated for version 7.4.406
Bram Moolenaar <bram@vim.org>
parents: 5712
diff changeset
40 :set ff=unix
5450
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 :%w >> test.out
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 :"sleep 10
5712
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
43 :"
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
44 :" Testing 'lispwords'
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
45 :"
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
46 :setglobal lispwords=foo,bar,baz
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
47 :setlocal lispwords-=foo | setlocal lispwords+=quux
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
48 :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
49 :setlocal lispwords<
06e5f65c34d8 updated for version 7.4.201
Bram Moolenaar <bram@vim.org>
parents: 5450
diff changeset
50 :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
51 :qa!
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 ENDTEST
829aa8c8449d updated for version 7.4.075
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53