2607
|
1 " Tests for storing global variables in the .viminfo file vim: set ft=vim:
|
|
2
|
|
3 STARTTEST
|
|
4 :so small.vim
|
|
5 :" Do all test in a separate window to avoid E211 when we recursively
|
|
6 :" delete the Xfind directory during cleanup
|
|
7 :"
|
|
8 :" This will cause a few errors, do it silently.
|
|
9 :set visualbell
|
|
10 :set nocp viminfo+=!,nviminfo
|
|
11 :let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}
|
|
12 :" store a really long list, so line wrapping will occur in viminfo file
|
|
13 :let MY_GLOBAL_LIST=range(1,100)
|
|
14 :wv! Xviminfo
|
|
15 :unlet MY_GLOBAL_DICT
|
|
16 :unlet MY_GLOBAL_LIST
|
|
17 :rv! Xviminfo
|
|
18 :call delete('Xviminfo')
|
|
19 :if exists("MY_GLOBAL_DICT")
|
|
20 :redir >> test.out
|
|
21 :echo MY_GLOBAL_DICT
|
|
22 :redir end
|
|
23 :endif
|
|
24 :if exists("MY_GLOBAL_LIST")
|
|
25 :redir >> test.out
|
|
26 :echo MY_GLOBAL_LIST
|
|
27 :redir end
|
|
28 :endif
|
|
29 :redir >> test.out
|
|
30 :echo "foobar"
|
|
31 :redir end
|
|
32 :endif
|
|
33 :qa!
|
|
34 ENDTEST
|
|
35
|
|
36 eof
|