neovim.tests.nvim_with_opt_plugin: fixed

once :Dashboard succeeded, the script would close neovim and thus never
terminate. We instead check if the command ":Dashboard" exists.
This commit is contained in:
Matthieu Coudron 2023-04-01 21:28:38 +02:00
parent 568f71b9d4
commit 67f6f13c2e

View File

@ -169,7 +169,7 @@ rec {
nvim_with_gitsigns_plugin = neovim.override {
extraName = "-with-gitsigns-plugin";
configure.packages.plugins = {
configure.packages.plugins = {
start = [
vimPlugins.gitsigns-nvim
];
@ -260,13 +260,12 @@ rec {
packadd dashboard-nvim-unique-for-tests-please-dont-use-opt
" Try to run Dashboard again, and throw if it fails
try
Dashboard
echo "Dashboard found"
catch /^Vim\%((\a\+)\)\=:E492/
let res = exists(':Dashboard')
if res == 0
echo "Dashboard not found, throwing error"
cquit 1
endtry
endif
cquit 0
'';
};