diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-03-14 02:12:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 09:12:26 +0800 |
commit | 3e8955094a615f2a805350050bc1703a294b1b85 (patch) | |
tree | 0e5a98e591ae1f491cd0738f7128c714a4516919 | |
parent | f01f18cdf4ffc3ce035db5fde2f45493eebb7fd9 (diff) | |
download | rneovim-3e8955094a615f2a805350050bc1703a294b1b85.tar.gz rneovim-3e8955094a615f2a805350050bc1703a294b1b85.tar.bz2 rneovim-3e8955094a615f2a805350050bc1703a294b1b85.zip |
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.
-rwxr-xr-x | src/nvim/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/functional/core/channels_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/provider/perl_spec.lua | 5 | ||||
-rw-r--r-- | test/functional/ui/messages_spec.lua | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index edd0b178d4..9b42a442a1 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -740,6 +740,7 @@ if(WIN32) set(EXTERNAL_BLOBS_SCRIPT "file(MAKE_DIRECTORY \"${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms\")") foreach(DEP_FILE IN ITEMS + cat.exe curl-ca-bundle.crt curl.exe diff.exe diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua index 8275575c24..5771ddcb94 100644 --- a/test/functional/core/channels_spec.lua +++ b/test/functional/core/channels_spec.lua @@ -230,6 +230,7 @@ describe('channels', function() end) it('can use buffered output mode', function() + skip(funcs.executable('grep') == 0, 'missing "grep" command') source([[ let g:job_opts = { \ 'on_stdout': function('OnEvent'), @@ -262,6 +263,7 @@ describe('channels', function() end) it('can use buffered output mode with no stream callback', function() + skip(funcs.executable('grep') == 0, 'missing "grep" command') source([[ function! OnEvent(id, data, event) dict call rpcnotify(1, a:event, a:id, a:data, self.stdout) 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') diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index db45e80dae..a92b55ae5d 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -16,6 +16,8 @@ local poke_eventloop = helpers.poke_eventloop local assert_alive = helpers.assert_alive local is_os = helpers.is_os local is_ci = helpers.is_ci +local funcs = helpers.funcs +local skip = helpers.skip describe('ui/ext_messages', function() local screen @@ -1916,6 +1918,7 @@ aliquip ex ea commodo consequat.]]) end) it('with :!cmd does not crash on resize', function() + skip(funcs.executable('sleep') == 0, 'missing "sleep" command') feed(':!sleep 1<cr>') screen:expect{grid=[[ | |