File tree 1 file changed +69
-8
lines changed
tests/test-sources/plugins/bufferlines 1 file changed +69
-8
lines changed Original file line number Diff line number Diff line change
1
+ { lib , pkgs , ... } :
1
2
{
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
+ } ;
5
27
6
28
example = {
7
29
plugins . bufferline = {
124
146
} ;
125
147
} ;
126
148
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 =
160
+ config . extraPlugins != [ ]
161
+ && lib . any (
162
+ x : lib . trace "${ x . pname or "" } " x . pname or null != "nvim-web-devicons"
163
+ ) config . extraPlugins ;
164
+ message = "nvim-web-devicons package was found when it wasn't expected" ;
165
+ }
166
+ ] ;
167
+ } ;
168
+
169
+ package-overrides =
170
+ { config , ... } :
171
+ {
172
+ plugins . bufferline = {
173
+ enable = true ;
174
+ iconsPackage = pkgs . vimPlugins . mini-nvim ;
175
+ } ;
176
+
177
+ assertions = [
178
+ {
179
+ assertion =
180
+ config . extraPlugins != [ ]
181
+ && lib . any ( x : lib . trace "${ x . pname or "" } " x . pname or null == "mini.nvim" ) config . extraPlugins ;
182
+ message = "mini-nvim package wasn't found when it was expected" ;
183
+ }
184
+ {
185
+ assertion =
186
+ config . extraPlugins != [ ]
187
+ && ! lib . any (
188
+ x : lib . trace "${ x . pname or "" } " x . pname or null == "nvim-web-devicons"
189
+ ) config . extraPlugins ;
190
+ message = "nvim-web-devicons package was found when it wasn't expected" ;
191
+ }
192
+ ] ;
131
193
} ;
132
- } ;
133
194
}
You can’t perform that action at this time.
0 commit comments