@@ -237,22 +237,22 @@ func TestParseFlakeInstallable(t *testing.T) {
237237
238238 "." : {Ref : FlakeRef {Type : "path" , Path : "." }},
239239 ".#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 : "." }},
244244
245245 "./flake" : {Ref : FlakeRef {Type : "path" , Path : "./flake" }},
246246 "./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" }},
250250
251251 "indirect" : {Ref : FlakeRef {Type : "indirect" , ID : "indirect" }},
252252 "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" }},
256256
257257 "%23#app" : {AttrPath : "app" , Ref : FlakeRef {Type : "indirect" , ID : "#" }},
258258 "./%23#app" : {AttrPath : "app" , Ref : FlakeRef {Type : "path" , Path : "./#" }},
@@ -280,42 +280,6 @@ func TestParseFlakeInstallable(t *testing.T) {
280280 }
281281}
282282
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-
319283func TestBuildQueryString (t * testing.T ) {
320284 defer func () {
321285 if r := recover (); r == nil {
0 commit comments