Loading pkgs/applications/editors/neovim/tests/default.nix +17 −21 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ writeText, neovim, vimPlugins, neovimUtils, wrapNeovimUnstable, neovim-unwrapped, fetchFromGitLab, Loading @@ -21,8 +20,6 @@ pkgs, }: let inherit (neovimUtils) makeNeovimConfig; plugins = with vimPlugins; [ { plugin = vim-obsession; Loading @@ -43,20 +40,6 @@ let } ]; nvimConfSingleLines = { plugins = packagesWithSingleLineConfigs; neovimRcContent = '' " just a comment ''; }; nvimConfNix = { inherit plugins; neovimRcContent = '' " just a comment ''; }; nvim-with-luasnip = wrapNeovim2 "-with-luasnip" { plugins = [ { Loading Loading @@ -105,6 +88,7 @@ let } ( '' export PATH="${neovim-drv}/bin:$PATH" source ${nmt}/bash-lib/assertions.sh vimrc="${writeText "test-${neovim-drv.name}-init.vim" neovim-drv.initRc}" luarc="${writeText "test-${neovim-drv.name}-init.lua" neovim-drv.luaRcContent}" Loading Loading @@ -139,8 +123,19 @@ pkgs.lib.recurseIntoAttrs rec { ### neovim tests ################## nvim_with_plugins = wrapNeovim2 "-with-plugins" nvimConfNix; nvim_singlelines = wrapNeovim2 "-single-lines" nvimConfSingleLines; nvim_with_plugins = wrapNeovim2 "-with-plugins" { inherit plugins; neovimRcContent = '' " just a comment ''; }; nvim_singlelines = wrapNeovim2 "-single-lines" { plugins = packagesWithSingleLineConfigs; neovimRcContent = '' " just a comment ''; }; # test that passthru.initRc hasn't changed passthruInitRc = runTest nvim_singlelines '' Loading Loading @@ -413,12 +408,13 @@ pkgs.lib.recurseIntoAttrs rec { # check that bringing in one plugin with lua deps makes those deps visible from wrapper # for instance luasnip has a dependency on jsregexp can_require_transitive_deps = runTest nvim-with-luasnip '' ${nvim-with-luasnip}/bin/nvim -i NONE -c "lua require'jsregexp'" -e +quitall! nvim --headless -i NONE -c "lua require'jsregexp'" -e +quitall! ''; inherit nvim_with_rocks_nvim; rocks_install_plenary = runTest nvim_with_rocks_nvim '' ${nvim_with_rocks_nvim}/bin/nvim -V3log.txt -i NONE +'Rocks install plenary.nvim' +quit! -e nvim -V3rocks-log.txt -i NONE +'Rocks install plenary.nvim' +quit! -e ''; ''; inherit (vimPlugins) corePlugins; Loading Loading
pkgs/applications/editors/neovim/tests/default.nix +17 −21 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ writeText, neovim, vimPlugins, neovimUtils, wrapNeovimUnstable, neovim-unwrapped, fetchFromGitLab, Loading @@ -21,8 +20,6 @@ pkgs, }: let inherit (neovimUtils) makeNeovimConfig; plugins = with vimPlugins; [ { plugin = vim-obsession; Loading @@ -43,20 +40,6 @@ let } ]; nvimConfSingleLines = { plugins = packagesWithSingleLineConfigs; neovimRcContent = '' " just a comment ''; }; nvimConfNix = { inherit plugins; neovimRcContent = '' " just a comment ''; }; nvim-with-luasnip = wrapNeovim2 "-with-luasnip" { plugins = [ { Loading Loading @@ -105,6 +88,7 @@ let } ( '' export PATH="${neovim-drv}/bin:$PATH" source ${nmt}/bash-lib/assertions.sh vimrc="${writeText "test-${neovim-drv.name}-init.vim" neovim-drv.initRc}" luarc="${writeText "test-${neovim-drv.name}-init.lua" neovim-drv.luaRcContent}" Loading Loading @@ -139,8 +123,19 @@ pkgs.lib.recurseIntoAttrs rec { ### neovim tests ################## nvim_with_plugins = wrapNeovim2 "-with-plugins" nvimConfNix; nvim_singlelines = wrapNeovim2 "-single-lines" nvimConfSingleLines; nvim_with_plugins = wrapNeovim2 "-with-plugins" { inherit plugins; neovimRcContent = '' " just a comment ''; }; nvim_singlelines = wrapNeovim2 "-single-lines" { plugins = packagesWithSingleLineConfigs; neovimRcContent = '' " just a comment ''; }; # test that passthru.initRc hasn't changed passthruInitRc = runTest nvim_singlelines '' Loading Loading @@ -413,12 +408,13 @@ pkgs.lib.recurseIntoAttrs rec { # check that bringing in one plugin with lua deps makes those deps visible from wrapper # for instance luasnip has a dependency on jsregexp can_require_transitive_deps = runTest nvim-with-luasnip '' ${nvim-with-luasnip}/bin/nvim -i NONE -c "lua require'jsregexp'" -e +quitall! nvim --headless -i NONE -c "lua require'jsregexp'" -e +quitall! ''; inherit nvim_with_rocks_nvim; rocks_install_plenary = runTest nvim_with_rocks_nvim '' ${nvim_with_rocks_nvim}/bin/nvim -V3log.txt -i NONE +'Rocks install plenary.nvim' +quit! -e nvim -V3rocks-log.txt -i NONE +'Rocks install plenary.nvim' +quit! -e ''; ''; inherit (vimPlugins) corePlugins; Loading