blob: 4fbe5e4d01ea30db887b1ec0b628e6ce1cec03b5 [file] [log] [blame]
Bram Moolenaar680eeca2010-10-20 17:44:42 +02001" Tests for storing global variables in the .viminfo file vim: set ft=vim:
2
3STARTTEST
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!
34ENDTEST
35
36eof