mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
neovim.tests: neovim-plugin-config
make test TEST=neovim-plugin-config - would previously use `-u` which we precisely want to avoid relying on because of side-effects. Likewise, `-es` skips some initialization phase (see `:h startup`). - Instead of several stdout redirections, write to a file directly. - also logs more via -V3$out/log.txt to help debug
This commit is contained in:
parent
d1c29486eb
commit
accbbb4a04
1 changed files with 3 additions and 4 deletions
|
@ -21,10 +21,9 @@ lib.mkIf config.test.enableBig {
|
|||
_module.args.pkgs = lib.mkForce realPkgs;
|
||||
|
||||
nmt.script = ''
|
||||
vimout=$(mktemp)
|
||||
echo "redir >> /dev/stdout | echo g:hmExtraConfig | echo g:hmPlugins | redir END" \
|
||||
| ${pkgs.neovim}/bin/nvim -es -u "$TESTED/home-files/.config/nvim/init.lua" \
|
||||
> "$vimout" || true
|
||||
vimout=$out/nvim-output
|
||||
export HOME=$TESTED/home-files
|
||||
${pkgs.neovim-unwrapped}/bin/nvim -i NONE -V3$out/log.txt +"redir >> $vimout | echo g:hmExtraConfig | echo g:hmPlugins | redir END" +'exit'
|
||||
assertFileContains "$vimout" "HM_EXTRA_CONFIG"
|
||||
assertFileContains "$vimout" "HM_PLUGINS_CONFIG"
|
||||
'';
|
||||
|
|
Loading…
Add table
Reference in a new issue