Skip to content

Commit d2d9d9f

Browse files
tetoGaetanLepage
authored andcommitted
neovim.tests: add a test for passthru.initRc
1 parent 12dafac commit d2d9d9f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pkgs/applications/editors/neovim/tests/default.nix

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,18 @@ in
101101
### neovim tests
102102
##################
103103
nvim_with_plugins = wrapNeovim2 "-with-plugins" nvimConfNix;
104+
nvim_singlelines = wrapNeovim2 "-single-lines" nvimConfSingleLines;
105+
106+
# test that passthru.initRc hasn't changed
107+
passthruInitRc = runTest nvim_singlelines ''
108+
INITRC=${pkgs.writeTextFile { name = "initrc"; text = nvim_singlelines.passthru.initRc; }}
109+
assertFileContent \
110+
$INITRC \
111+
"${./init-single-lines.vim}"
112+
'';
104113

105-
singlelinesconfig = runTest (wrapNeovim2 "-single-lines" nvimConfSingleLines) ''
114+
# test single line concatenation
115+
singlelinesconfig = runTest nvim_singlelines ''
106116
assertFileContains \
107117
"$luarcGeneric" \
108118
"vim.cmd.source \"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-init.vim"
@@ -127,6 +137,7 @@ in
127137
viAlias = true;
128138
};
129139

140+
# test it still works with vim-plug
130141
nvim_with_plug = neovim.override {
131142
extraName = "-with-plug";
132143
configure.packages.plugins = with pkgs.vimPlugins; {

0 commit comments

Comments
 (0)