File tree Expand file tree Collapse file tree 1 file changed +65
-8
lines changed
tests/test-sources/plugins/bufferlines Expand file tree Collapse file tree 1 file changed +65
-8
lines changed Original file line number Diff line number Diff line change 1+ { lib , pkgs , ... } :
12{
2- empty = {
3- plugins . bufferline . enable = true ;
4- } ;
3+ empty =
4+ { config , ... } :
5+ {
6+ plugins . bufferline . enable = true ;
7+
8+ assertions = [
9+ {
10+ assertion =
11+ config . extraPlugins != [ ]
12+ && lib . any (
13+ x : lib . trace "${ x . pname or "" } " x . pname or null == "bufferline.nvim"
14+ ) config . extraPlugins ;
15+ message = "bufferline package wasn't found when it was expected" ;
16+ }
17+ {
18+ assertion =
19+ config . extraPlugins != [ ]
20+ && lib . any (
21+ x : lib . trace "${ x . pname or "" } " x . pname or null == "nvim-web-devicons"
22+ ) config . extraPlugins ;
23+ message = "nvim-web-devicons package wasn't found when it was expected" ;
24+ }
25+ ] ;
26+ } ;
527
628 example = {
729 plugins . bufferline = {
124146 } ;
125147 } ;
126148
127- no-packages = {
128- plugins . bufferline = {
129- enable = true ;
130- iconsPackage = null ;
149+ no-packages =
150+ { config , ... } :
151+ {
152+ plugins . bufferline = {
153+ enable = true ;
154+ iconsPackage = null ;
155+ } ;
156+
157+ assertions = [
158+ {
159+ assertion = lib . all (
160+ x : lib . trace "${ x . pname or "" } " x . pname or null != "nvim-web-devicons"
161+ ) config . extraPlugins ;
162+ message = "nvim-web-devicons package was found when it wasn't expected" ;
163+ }
164+ ] ;
165+ } ;
166+
167+ package-overrides =
168+ { config , ... } :
169+ {
170+ plugins . bufferline = {
171+ enable = true ;
172+ iconsPackage = pkgs . vimPlugins . mini-nvim ;
173+ } ;
174+
175+ assertions = [
176+ {
177+ assertion =
178+ config . extraPlugins != [ ]
179+ && lib . any ( x : lib . trace "${ x . pname or "" } " x . pname or null == "mini.nvim" ) config . extraPlugins ;
180+ message = "mini-nvim package wasn't found when it was expected" ;
181+ }
182+ {
183+ assertion = lib . all (
184+ x : lib . trace "${ x . pname or "" } " x . pname or null != "nvim-web-devicons"
185+ ) config . extraPlugins ;
186+ message = "nvim-web-devicons package was found when it wasn't expected" ;
187+ }
188+ ] ;
131189 } ;
132- } ;
133190}
You can’t perform that action at this time.
0 commit comments