Skip to content

Commit 5342e5f

Browse files
committed
tests/plugins/cmp: test the new+old used together warning
1 parent 4150d1a commit 5342e5f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/test-sources/plugins/cmp/all-sources.nix

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,29 @@
103103
};
104104
};
105105
};
106+
107+
both-impl-used = {
108+
plugins = {
109+
cmp = {
110+
enable = true;
111+
autoEnableSources = true;
112+
settings.sources = [
113+
{ name = "cmp-emoji"; }
114+
];
115+
};
116+
cmp-git = {
117+
enable = true;
118+
cmp.enable = true;
119+
};
120+
};
121+
test = {
122+
buildNixvim = false;
123+
warnings = expect: [
124+
(expect "count" 1)
125+
(expect "any" "Nixvim (plugins.cmp): You have enabled `autoEnableSources`")
126+
(expect "any" "However, 1 plugins have cmp integration configured via `plugins.*.cmp`:")
127+
(expect "any" "- `plugins.cmp-git`")
128+
];
129+
};
130+
};
106131
}

0 commit comments

Comments
 (0)