diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-10-16 01:54:07 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-10-16 01:54:07 -0400 |
commit | 3a970e57dfd48f090f8ccc21567b7974e13d4c68 (patch) | |
tree | 5aeaf1cd7a85c17b29276eee88e9881f56ea134c /test/functional/legacy | |
parent | a3f048ee06dea15490d7b874d295c3fc850cdc51 (diff) | |
parent | db6cba7d5759e02379005702c7a9d760137f4389 (diff) | |
download | rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.gz rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.bz2 rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.zip |
Merge pull request #2506 from ZyX-I/shada
Replace viminfo with ShaDa files
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/074_global_var_in_viminfo_spec.lua | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/test/functional/legacy/074_global_var_in_viminfo_spec.lua b/test/functional/legacy/074_global_var_in_viminfo_spec.lua index a89a4181cd..2428b7f74d 100644 --- a/test/functional/legacy/074_global_var_in_viminfo_spec.lua +++ b/test/functional/legacy/074_global_var_in_viminfo_spec.lua @@ -1,14 +1,15 @@ --- Tests for storing global variables in the .viminfo file +-- Tests for storing global variables in the .shada file local helpers, lfs = require('test.functional.helpers'), require('lfs') local clear, execute, eq, neq, eval, wait, spawn = helpers.clear, helpers.execute, helpers.eq, helpers.neq, helpers.eval, helpers.wait, helpers.spawn -describe('storing global variables in viminfo files', function() +describe('storing global variables in ShaDa files', function() + local tempname = 'Xtest-functional-legacy-074' setup(function() clear() - os.remove("Xviminfo") + os.remove(tempname) end) it('is working', function() @@ -27,33 +28,34 @@ describe('storing global variables in viminfo files', function() execute( -- This will cause a few errors, do it silently. 'set visualbell', - 'set viminfo+=!', + 'set shada+=!', "let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}", - -- Store a really long list, so line wrapping will occur in viminfo - -- file. + -- Store a really long list. Initially this was testing line wrapping in + -- viminfo, but shada files has no line wrapping, no matter how long the + -- list is. 'let MY_GLOBAL_LIST=range(1,100)' ) eq(test_dict, eval('MY_GLOBAL_DICT')) eq(test_list, eval('MY_GLOBAL_LIST')) - execute('wv! Xviminfo') + execute('wsh! ' .. tempname) wait() - -- Assert that the viminfo file exists. - neq(nil, lfs.attributes('Xviminfo')) + -- Assert that the shada file exists. + neq(nil, lfs.attributes(tempname)) execute('unlet MY_GLOBAL_DICT', 'unlet MY_GLOBAL_LIST') -- Assert that the variables where deleted. eq(0, eval('exists("MY_GLOBAL_DICT")')) eq(0, eval('exists("MY_GLOBAL_LIST")')) - execute('rv! Xviminfo') + execute('rsh! ' .. tempname) eq(test_list, eval('MY_GLOBAL_LIST')) eq(test_dict, eval('MY_GLOBAL_DICT')) end) teardown(function() - os.remove('Xviminfo') + os.remove(tempname) end) end) |