diff options
author | dm1try <me@dmitry.it> | 2020-05-03 23:57:47 +0300 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-12-01 10:51:31 +0100 |
commit | 33f324796cd760fb2ceb17a276660268bface9b6 (patch) | |
tree | 1ff96fc5327450f35c1642ff02736e8157346087 /test | |
parent | 767cd8b17b71f78bdd4c2e0dd8d3f4f0f1551381 (diff) | |
download | rneovim-33f324796cd760fb2ceb17a276660268bface9b6.tar.gz rneovim-33f324796cd760fb2ceb17a276660268bface9b6.tar.bz2 rneovim-33f324796cd760fb2ceb17a276660268bface9b6.zip |
startup: allow lua files as session one
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/core/startup_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 22880a1fe8..ff0fdbea45 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -493,3 +493,27 @@ describe('user config init', function() end) end) end) + +describe('user session', function() + local xhome = 'Xhome' + local pathsep = helpers.get_pathsep() + local session_file = table.concat({xhome, 'session.lua'}, pathsep) + + before_each(function() + rmdir(xhome) + + mkdir(xhome) + write_file(session_file, [[ + vim.g.lua_session = 1 + ]]) + end) + + after_each(function() + rmdir(xhome) + end) + + it('loads session from the provided lua file', function() + clear{ args={'-S', session_file }, env={ HOME=xhome }} + eq(1, eval('g:lua_session')) + end) +end) |