diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
commit | c324271b99eee4c621463f368914d57cd729bd9c (patch) | |
tree | 5d979d333a2d5f9c080991d5482fd5916f8579c6 /test/functional/legacy/074_global_var_in_viminfo_spec.lua | |
parent | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (diff) | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
download | rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.gz rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.bz2 rneovim-c324271b99eee4c621463f368914d57cd729bd9c.zip |
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'test/functional/legacy/074_global_var_in_viminfo_spec.lua')
-rw-r--r-- | test/functional/legacy/074_global_var_in_viminfo_spec.lua | 120 |
1 files changed, 107 insertions, 13 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 06d8b276d7..0a9ad330c2 100644 --- a/test/functional/legacy/074_global_var_in_viminfo_spec.lua +++ b/test/functional/legacy/074_global_var_in_viminfo_spec.lua @@ -1,10 +1,8 @@ -- Tests for storing global variables in the .shada file local helpers = require('test.functional.helpers')(after_each) -local luv = require('luv') local clear, command, eq, neq, eval, poke_eventloop = - helpers.clear, helpers.command, helpers.eq, helpers.neq, helpers.eval, - helpers.poke_eventloop + helpers.clear, helpers.command, helpers.eq, helpers.neq, helpers.eval, helpers.poke_eventloop describe('storing global variables in ShaDa files', function() local tempname = 'Xtest-functional-legacy-074' @@ -14,19 +12,115 @@ describe('storing global variables in ShaDa files', function() end) it('is working', function() - clear{args_rm={'-i'}, args={'-i', 'Xviminfo'}} + clear { args_rm = { '-i' }, args = { '-i', 'Xviminfo' } } - local test_dict = {foo = 1, bar = 0, longvarible = 1000} - local test_list = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 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} + local test_dict = { foo = 1, bar = 0, longvarible = 1000 } + local test_list = { + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 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, + } command('set visualbell') command('set shada+=!') - command('let MY_GLOBAL_DICT={\'foo\': 1, \'bar\': 0, \'longvarible\': 1000}') + command("let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}") -- 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. @@ -39,7 +133,7 @@ describe('storing global variables in ShaDa files', function() poke_eventloop() -- Assert that the shada file exists. - neq(nil, luv.fs_stat(tempname)) + neq(nil, vim.uv.fs_stat(tempname)) command('unlet MY_GLOBAL_DICT') command('unlet MY_GLOBAL_LIST') -- Assert that the variables where deleted. |