functests: Fix legacy/074_global_var_in_viminfo_spec

This commit is contained in:
ZyX 2017-04-09 01:53:47 +03:00
parent 4da4d5cfd9
commit c35bd4d074
1 changed files with 10 additions and 12 deletions

View File

@ -26,16 +26,14 @@ describe('storing global variables in ShaDa files', function()
71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100} 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100}
command( command('set visualbell')
-- This will cause a few errors, do it silently. command('set shada+=!')
'set visualbell', command('let MY_GLOBAL_DICT={\'foo\': 1, \'bar\': 0, \'longvarible\': 1000}')
'set shada+=!', -- Store a really long list. Initially this was testing line wrapping in
"let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}", -- viminfo, but shada files has no line wrapping, no matter how long the
-- Store a really long list. Initially this was testing line wrapping in -- list is.
-- viminfo, but shada files has no line wrapping, no matter how long the command('let MY_GLOBAL_LIST=range(1, 100)')
-- list is.
'let MY_GLOBAL_LIST=range(1,100)'
)
eq(test_dict, eval('MY_GLOBAL_DICT')) eq(test_dict, eval('MY_GLOBAL_DICT'))
eq(test_list, eval('MY_GLOBAL_LIST')) eq(test_list, eval('MY_GLOBAL_LIST'))
@ -44,8 +42,8 @@ describe('storing global variables in ShaDa files', function()
-- Assert that the shada file exists. -- Assert that the shada file exists.
neq(nil, lfs.attributes(tempname)) neq(nil, lfs.attributes(tempname))
command('unlet MY_GLOBAL_DICT', command('unlet MY_GLOBAL_DICT')
'unlet MY_GLOBAL_LIST') command('unlet MY_GLOBAL_LIST')
-- Assert that the variables where deleted. -- Assert that the variables where deleted.
eq(0, eval('exists("MY_GLOBAL_DICT")')) eq(0, eval('exists("MY_GLOBAL_DICT")'))
eq(0, eval('exists("MY_GLOBAL_LIST")')) eq(0, eval('exists("MY_GLOBAL_LIST")'))