@@ -237,22 +237,22 @@ func TestParseFlakeInstallable(t *testing.T) {
237
237
238
238
"." : {Ref : FlakeRef {Type : "path" , Path : "." }},
239
239
".#app" : {AttrPath : "app" , Ref : FlakeRef {Type : "path" , Path : "." }},
240
- ".#app^out" : {AttrPath : "app" , Outputs : [] string { "out" } , Ref : FlakeRef {Type : "path" , Path : "." }},
241
- ".#app^out,lib" : {AttrPath : "app" , Outputs : [] string { " out", "lib" } , Ref : FlakeRef {Type : "path" , Path : "." }},
242
- ".#app^*" : {AttrPath : "app" , Outputs : [] string { "*" } , Ref : FlakeRef {Type : "path" , Path : "." }},
243
- ".^*" : {Outputs : [] string { "*" } , Ref : FlakeRef {Type : "path" , Path : "." }},
240
+ ".#app^out" : {AttrPath : "app" , Outputs : "out" , Ref : FlakeRef {Type : "path" , Path : "." }},
241
+ ".#app^out,lib" : {AttrPath : "app" , Outputs : "lib, out" , Ref : FlakeRef {Type : "path" , Path : "." }},
242
+ ".#app^*" : {AttrPath : "app" , Outputs : "*" , Ref : FlakeRef {Type : "path" , Path : "." }},
243
+ ".^*" : {Outputs : "*" , Ref : FlakeRef {Type : "path" , Path : "." }},
244
244
245
245
"./flake" : {Ref : FlakeRef {Type : "path" , Path : "./flake" }},
246
246
"./flake#app" : {AttrPath : "app" , Ref : FlakeRef {Type : "path" , Path : "./flake" }},
247
- "./flake#app^out" : {AttrPath : "app" , Outputs : [] string { "out" } , Ref : FlakeRef {Type : "path" , Path : "./flake" }},
248
- "./flake#app^out,lib" : {AttrPath : "app" , Outputs : [] string { " out", "lib" } , Ref : FlakeRef {Type : "path" , Path : "./flake" }},
249
- "./flake^out" : {Outputs : [] string { "out" } , Ref : FlakeRef {Type : "path" , Path : "./flake" }},
247
+ "./flake#app^out" : {AttrPath : "app" , Outputs : "out" , Ref : FlakeRef {Type : "path" , Path : "./flake" }},
248
+ "./flake#app^out,lib" : {AttrPath : "app" , Outputs : "lib, out" , Ref : FlakeRef {Type : "path" , Path : "./flake" }},
249
+ "./flake^out" : {Outputs : "out" , Ref : FlakeRef {Type : "path" , Path : "./flake" }},
250
250
251
251
"indirect" : {Ref : FlakeRef {Type : "indirect" , ID : "indirect" }},
252
252
"nixpkgs#app" : {AttrPath : "app" , Ref : FlakeRef {Type : "indirect" , ID : "nixpkgs" }},
253
- "nixpkgs#app^out" : {AttrPath : "app" , Outputs : [] string { "out" } , Ref : FlakeRef {Type : "indirect" , ID : "nixpkgs" }},
254
- "nixpkgs#app^out,lib" : {AttrPath : "app" , Outputs : [] string { " out", "lib" } , Ref : FlakeRef {Type : "indirect" , ID : "nixpkgs" }},
255
- "nixpkgs^out" : {Outputs : [] string { "out" } , Ref : FlakeRef {Type : "indirect" , ID : "nixpkgs" }},
253
+ "nixpkgs#app^out" : {AttrPath : "app" , Outputs : "out" , Ref : FlakeRef {Type : "indirect" , ID : "nixpkgs" }},
254
+ "nixpkgs#app^out,lib" : {AttrPath : "app" , Outputs : "lib, out" , Ref : FlakeRef {Type : "indirect" , ID : "nixpkgs" }},
255
+ "nixpkgs^out" : {Outputs : "out" , Ref : FlakeRef {Type : "indirect" , ID : "nixpkgs" }},
256
256
257
257
"%23#app" : {AttrPath : "app" , Ref : FlakeRef {Type : "indirect" , ID : "#" }},
258
258
"./%23#app" : {AttrPath : "app" , Ref : FlakeRef {Type : "path" , Path : "./#" }},
@@ -280,42 +280,6 @@ func TestParseFlakeInstallable(t *testing.T) {
280
280
}
281
281
}
282
282
283
- func TestFlakeInstallableDefaultOutputs (t * testing.T ) {
284
- install := FlakeInstallable {Outputs : nil }
285
- if ! install .DefaultOutputs () {
286
- t .Errorf ("DefaultOutputs() = false for nil outputs slice, want true" )
287
- }
288
-
289
- install = FlakeInstallable {Outputs : []string {}}
290
- if ! install .DefaultOutputs () {
291
- t .Errorf ("DefaultOutputs() = false for empty outputs slice, want true" )
292
- }
293
-
294
- install = FlakeInstallable {Outputs : []string {"out" }}
295
- if install .DefaultOutputs () {
296
- t .Errorf ("DefaultOutputs() = true for %v, want false" , install .Outputs )
297
- }
298
- }
299
-
300
- func TestFlakeInstallableAllOutputs (t * testing.T ) {
301
- install := FlakeInstallable {Outputs : []string {"*" }}
302
- if ! install .AllOutputs () {
303
- t .Errorf ("AllOutputs() = false for %v, want true" , install .Outputs )
304
- }
305
- install = FlakeInstallable {Outputs : []string {"out" , "*" }}
306
- if ! install .AllOutputs () {
307
- t .Errorf ("AllOutputs() = false for %v, want true" , install .Outputs )
308
- }
309
- install = FlakeInstallable {Outputs : nil }
310
- if install .AllOutputs () {
311
- t .Errorf ("AllOutputs() = true for nil outputs slice, want false" )
312
- }
313
- install = FlakeInstallable {Outputs : []string {}}
314
- if install .AllOutputs () {
315
- t .Errorf ("AllOutputs() = true for empty outputs slice, want false" )
316
- }
317
- }
318
-
319
283
func TestBuildQueryString (t * testing.T ) {
320
284
defer func () {
321
285
if r := recover (); r == nil {
0 commit comments