From 9d574f8dd7248a4cf8dcbe615f3058d34efb7ac3 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:56:16 +0100 Subject: ci: bump to windows 2022 Skip failing funcitonaltests. Use jobstart() instead termopen() for oldtests to prevent CI freezing. --- test/functional/ex_cmds/mksession_spec.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/functional/ex_cmds/mksession_spec.lua') diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua index 0a0c7ca410..0a1cdd93aa 100644 --- a/test/functional/ex_cmds/mksession_spec.lua +++ b/test/functional/ex_cmds/mksession_spec.lua @@ -18,6 +18,8 @@ local is_os = helpers.is_os local file_prefix = 'Xtest-functional-ex_cmds-mksession_spec' +if helpers.skip(helpers.is_os('win')) then return end + describe(':mksession', function() local session_file = file_prefix .. '.vim' local tab_dir = file_prefix .. '.d' -- cgit From 743860de40502227b3f0ed64317eb937d24d4a36 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 4 Apr 2023 21:59:06 +0200 Subject: test: replace lfs with luv and vim.fs test: replace lfs with luv luv already pretty much does everything lfs does, so this duplication of dependencies isn't needed. --- test/functional/ex_cmds/mksession_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/ex_cmds/mksession_spec.lua') diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua index 0a1cdd93aa..d70ccb5b39 100644 --- a/test/functional/ex_cmds/mksession_spec.lua +++ b/test/functional/ex_cmds/mksession_spec.lua @@ -1,4 +1,3 @@ -local lfs = require('lfs') local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') @@ -15,6 +14,7 @@ local sleep = helpers.sleep local meths = helpers.meths local skip = helpers.skip local is_os = helpers.is_os +local mkdir = helpers.mkdir local file_prefix = 'Xtest-functional-ex_cmds-mksession_spec' @@ -26,7 +26,7 @@ describe(':mksession', function() before_each(function() clear() - lfs.mkdir(tab_dir) + mkdir(tab_dir) end) after_each(function() -- cgit From 1fe1bb084d0099fc4f9bfdc11189485d0f74b75a Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 19 Dec 2022 16:37:45 +0000 Subject: refactor(options): deprecate nvim[_buf|_win]_[gs]et_option Co-authored-by: zeertzjq Co-authored-by: famiu --- test/functional/ex_cmds/mksession_spec.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/functional/ex_cmds/mksession_spec.lua') diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua index d70ccb5b39..f51e7c62cb 100644 --- a/test/functional/ex_cmds/mksession_spec.lua +++ b/test/functional/ex_cmds/mksession_spec.lua @@ -81,13 +81,13 @@ describe(':mksession', function() local buf_count = #meths.list_bufs() eq(2, buf_count) - eq('terminal', meths.buf_get_option(0, 'buftype')) + eq('terminal', meths.get_option_value('buftype', { buf = 0 })) test_terminal_session_disabled(2) -- no terminal should be set. As a side effect we end up with a blank buffer - eq('', meths.buf_get_option(meths.list_bufs()[1], 'buftype')) - eq('', meths.buf_get_option(meths.list_bufs()[2], 'buftype')) + eq('', meths.get_option_value('buftype', { buf = meths.list_bufs()[1] })) + eq('', meths.get_option_value('buftype', { buf = meths.list_bufs()[2] })) end ) @@ -112,7 +112,7 @@ describe(':mksession', function() it('do not restore :terminal if not set in sessionoptions, only buffer #13078', function() command('terminal') - eq('terminal', meths.buf_get_option(0, 'buftype')) + eq('terminal', meths.get_option_value('buftype', { buf = 0 })) local buf_count = #meths.list_bufs() eq(1, buf_count) @@ -120,7 +120,7 @@ describe(':mksession', function() test_terminal_session_disabled(1) -- no terminal should be set - eq('', meths.buf_get_option(0, 'buftype')) + eq('', meths.get_option_value('buftype', { buf = 0 })) end) it('restores tab-local working directories', function() @@ -249,7 +249,7 @@ describe(':mksession', function() style = 'minimal', } meths.open_win(buf, false, config) - local cmdheight = meths.get_option('cmdheight') + local cmdheight = meths.get_option_value('cmdheight', {}) command('mksession ' .. session_file) -- Create a new test instance of Nvim. @@ -262,7 +262,7 @@ describe(':mksession', function() -- window was not restored. eq(1, funcs.winnr('$')) -- The command-line height should remain the same as it was. - eq(cmdheight, meths.get_option('cmdheight')) + eq(cmdheight, meths.get_option_value('cmdheight', {})) os.remove(tmpfile) end) -- cgit From 576dddb46168e81aa0f78c28816082c662dedea1 Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Mon, 22 May 2023 12:47:10 +0600 Subject: test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value` `nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter. --- test/functional/ex_cmds/mksession_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/ex_cmds/mksession_spec.lua') diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua index f51e7c62cb..7522d4a99c 100644 --- a/test/functional/ex_cmds/mksession_spec.lua +++ b/test/functional/ex_cmds/mksession_spec.lua @@ -81,7 +81,7 @@ describe(':mksession', function() local buf_count = #meths.list_bufs() eq(2, buf_count) - eq('terminal', meths.get_option_value('buftype', { buf = 0 })) + eq('terminal', meths.get_option_value('buftype', {})) test_terminal_session_disabled(2) @@ -112,7 +112,7 @@ describe(':mksession', function() it('do not restore :terminal if not set in sessionoptions, only buffer #13078', function() command('terminal') - eq('terminal', meths.get_option_value('buftype', { buf = 0 })) + eq('terminal', meths.get_option_value('buftype', {})) local buf_count = #meths.list_bufs() eq(1, buf_count) @@ -120,7 +120,7 @@ describe(':mksession', function() test_terminal_session_disabled(1) -- no terminal should be set - eq('', meths.get_option_value('buftype', { buf = 0 })) + eq('', meths.get_option_value('buftype', {})) end) it('restores tab-local working directories', function() -- cgit