From 3e8955094a615f2a805350050bc1703a294b1b85 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 14 Mar 2023 02:12:26 +0100 Subject: test: re-bundle cat on windows (#21255) The builtin cat was removed in 4bc9229ecbec514e9a87cfc4be88ea27a971e9a1 as it is not used during runtime but only for tests. However, it is a very small and useful utility program that we need for a lot of our tests, so there's no harm in bundling it, and it helps us avoid complicating our build system by having two versions of neovim (neovim for users and neovim for testing). Also skip tests if "grep" or "sleep" isn't available. --- test/functional/provider/perl_spec.lua | 5 ----- 1 file changed, 5 deletions(-) (limited to 'test/functional/provider') diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua index ce92831f4c..5ab807e90d 100644 --- a/test/functional/provider/perl_spec.lua +++ b/test/functional/provider/perl_spec.lua @@ -9,8 +9,6 @@ local curbufmeths = helpers.curbufmeths local insert = helpers.insert local expect = helpers.expect local feed = helpers.feed -local is_os = helpers.is_os -local skip = helpers.skip do clear() @@ -26,8 +24,6 @@ before_each(function() end) describe('legacy perl provider', function() - skip(is_os('win')) - it('feature test', function() eq(1, eval('has("perl")')) end) @@ -70,7 +66,6 @@ describe('legacy perl provider', function() end) describe('perl provider', function() - skip(is_os('win')) teardown(function () os.remove('Xtest-perl-hello.pl') os.remove('Xtest-perl-hello-plugin.pl') -- 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/provider/perl_spec.lua | 4 ++-- test/functional/provider/ruby_spec.lua | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'test/functional/provider') diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua index 5ab807e90d..bc7261895d 100644 --- a/test/functional/provider/perl_spec.lua +++ b/test/functional/provider/perl_spec.lua @@ -5,7 +5,7 @@ local command = helpers.command local write_file = helpers.write_file local eval = helpers.eval local retry = helpers.retry -local curbufmeths = helpers.curbufmeths +local meths = helpers.meths local insert = helpers.insert local expect = helpers.expect local feed = helpers.feed @@ -45,7 +45,7 @@ describe('legacy perl provider', function() -- :perldo 1; doesn't change $_, -- the buffer should not be changed command('normal :perldo 1;') - eq(false, curbufmeths.get_option('modified')) + eq(false, meths.get_option_value('modified', {buf=0})) -- insert some text insert('abc\ndef\nghi') expect([[ diff --git a/test/functional/provider/ruby_spec.lua b/test/functional/provider/ruby_spec.lua index fba96100fc..40ace28c4e 100644 --- a/test/functional/provider/ruby_spec.lua +++ b/test/functional/provider/ruby_spec.lua @@ -3,7 +3,6 @@ local helpers = require('test.functional.helpers')(after_each) local assert_alive = helpers.assert_alive local clear = helpers.clear local command = helpers.command -local curbufmeths = helpers.curbufmeths local eq = helpers.eq local exc_exec = helpers.exc_exec local expect = helpers.expect @@ -98,7 +97,7 @@ describe(':rubydo command', function() it('does not modify the buffer if no changes are made', function() command('normal :rubydo 42') - eq(false, curbufmeths.get_option('modified')) + eq(false, meths.get_option_value('modified', {buf=0})) end) 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/provider/perl_spec.lua | 2 +- test/functional/provider/ruby_spec.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/provider') diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua index bc7261895d..8049f0f3e2 100644 --- a/test/functional/provider/perl_spec.lua +++ b/test/functional/provider/perl_spec.lua @@ -45,7 +45,7 @@ describe('legacy perl provider', function() -- :perldo 1; doesn't change $_, -- the buffer should not be changed command('normal :perldo 1;') - eq(false, meths.get_option_value('modified', {buf=0})) + eq(false, meths.get_option_value('modified', {})) -- insert some text insert('abc\ndef\nghi') expect([[ diff --git a/test/functional/provider/ruby_spec.lua b/test/functional/provider/ruby_spec.lua index 40ace28c4e..d3b967dfbe 100644 --- a/test/functional/provider/ruby_spec.lua +++ b/test/functional/provider/ruby_spec.lua @@ -97,7 +97,7 @@ describe(':rubydo command', function() it('does not modify the buffer if no changes are made', function() command('normal :rubydo 42') - eq(false, meths.get_option_value('modified', {buf=0})) + eq(false, meths.get_option_value('modified', {})) end) end) -- cgit From 55f6a1cab031ecc28c5a7f2558a0cac9df2145e1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 30 May 2023 07:18:12 +0800 Subject: vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register (#23817) Problem: Incsearch not triggered when pasting clipboard register on the command line. Solution: Also set "literally" when using a clipboard register. (Ken Takata, closes vim/vim#12460) https://github.com/vim/vim/commit/9cf6ab133227ac7e9169941752293bb7178d8e38 Co-authored-by: K.Takata --- test/functional/provider/clipboard_spec.lua | 2 +- test/functional/provider/provider_spec.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/provider') diff --git a/test/functional/provider/clipboard_spec.lua b/test/functional/provider/clipboard_spec.lua index 2c5185a974..c8f1518283 100644 --- a/test/functional/provider/clipboard_spec.lua +++ b/test/functional/provider/clipboard_spec.lua @@ -301,7 +301,7 @@ end) describe('clipboard (with fake clipboard.vim)', function() local function reset(...) - clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp', ...) + clear('--cmd', 'set rtp^=test/functional/fixtures', ...) end before_each(function() diff --git a/test/functional/provider/provider_spec.lua b/test/functional/provider/provider_spec.lua index 3895b8613f..b1c326d04c 100644 --- a/test/functional/provider/provider_spec.lua +++ b/test/functional/provider/provider_spec.lua @@ -7,7 +7,7 @@ local pcall_err = helpers.pcall_err describe('providers', function() before_each(function() - clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp') + clear('--cmd', 'set rtp^=test/functional/fixtures') end) it('with #Call(), missing g:loaded_xx_provider', function() -- cgit From 2f17ef1fc4b96cf1106fd95ba090d34a2e4b977b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 22 Jun 2023 04:09:14 -0700 Subject: fix(messages): use "Vimscript" instead of "VimL" #24111 followup to #24109 fix #16150 --- test/functional/provider/clipboard_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/provider') diff --git a/test/functional/provider/clipboard_spec.lua b/test/functional/provider/clipboard_spec.lua index c8f1518283..0099183302 100644 --- a/test/functional/provider/clipboard_spec.lua +++ b/test/functional/provider/clipboard_spec.lua @@ -211,7 +211,7 @@ describe('clipboard', function() eq('', eval('provider#clipboard#Error()')) end) - it('g:clipboard using VimL functions', function() + it('g:clipboard using Vimscript functions', function() -- Implements a fake clipboard provider. cache_enabled is meaningless here. source([[let g:clipboard = { \ 'name': 'custom', @@ -245,7 +245,7 @@ describe('clipboard', function() eq({{'star', ''}, 'b'}, eval("g:dummy_clipboard_star")) end) - describe('g:clipboard[paste] VimL function', function() + describe('g:clipboard[paste] Vimscript function', function() it('can return empty list for empty clipboard', function() source([[let g:dummy_clipboard = [] let g:clipboard = { -- cgit