From f11a877bcc1d66cc8bd7990c704f91c1e99c7d08 Mon Sep 17 00:00:00 2001 From: Heitor Augusto Date: Wed, 13 Nov 2024 16:34:13 -0300 Subject: [PATCH] tests/modules/output: add tests for providers --- tests/test-sources/modules/output.nix | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/tests/test-sources/modules/output.nix b/tests/test-sources/modules/output.nix index aa021685..d2444280 100644 --- a/tests/test-sources/modules/output.nix +++ b/tests/test-sources/modules/output.nix @@ -99,4 +99,54 @@ } ]; }; + + with-providers = { + withNodeJs = true; + withPerl = true; + withPython3 = true; + withRuby = true; + + extraConfigLua = '' + if vim.fn.executable("nvim-node") ~= 1 then + print("Unable to find Node.js provider.") + end + + if vim.fn.executable("nvim-perl") ~= 1 then + print("Unable to find Perl provider.") + end + + if vim.fn.executable("nvim-python3") ~= 1 then + print("Unable to find Python3 provider.") + end + + if vim.fn.executable("nvim-ruby") ~= 1 then + print("Unable to find Ruby provider.") + end + ''; + }; + + without-providers = { + withNodeJs = false; + withPerl = false; + withPython3 = false; + withRuby = false; + + extraConfigLua = '' + if vim.fn.executable("nvim-node") == 1 then + print("Node.js provider was found.") + end + + if vim.fn.executable("nvim-perl") == 1 then + print("Perl provider was found.") + end + + if vim.fn.executable("nvim-python3") == 1 then + print("Python3 provider was found.") + end + + if vim.fn.executable("nvim-ruby") == 1 then + print("Ruby provider was found.") + end + ''; + }; }