File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
testdata/SketchWithProfiles Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,9 @@ type ProfileRequiredLibraries []*ProfileLibraryReference
187187
188188// AsYaml outputs the required libraries as Yaml
189189func (p * ProfileRequiredLibraries ) AsYaml () string {
190+ if len (* p ) == 0 {
191+ return ""
192+ }
190193 res := " libraries:\n "
191194 for _ , lib := range * p {
192195 res += lib .AsYaml ()
Original file line number Diff line number Diff line change 1616package sketch
1717
1818import (
19- "fmt"
2019 "testing"
2120
2221 "github.com/arduino/go-paths-helper"
@@ -28,7 +27,6 @@ func TestProjectFileLoading(t *testing.T) {
2827 sketchProj := paths .New ("testdata" , "SketchWithProfiles" , "sketch.yml" )
2928 proj , err := LoadProjectFile (sketchProj )
3029 require .NoError (t , err )
31- fmt .Println (proj )
3230 golden , err := sketchProj .ReadFile ()
3331 require .NoError (t , err )
3432 require .Equal (t , proj .AsYaml (), string (golden ))
@@ -37,7 +35,6 @@ func TestProjectFileLoading(t *testing.T) {
3735 sketchProj := paths .New ("testdata" , "SketchWithDefaultFQBNAndPort" , "sketch.yml" )
3836 proj , err := LoadProjectFile (sketchProj )
3937 require .NoError (t , err )
40- fmt .Println (proj )
4138 golden , err := sketchProj .ReadFile ()
4239 require .NoError (t , err )
4340 require .Equal (t , proj .AsYaml (), string (golden ))
Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ profiles:
99 - Arduino_ConnectionHandler (0.6.4)
1010 - TinyDHT sensor library (1.1.0)
1111
12+ nanorp_nolib :
13+ fqbn : arduino:mbed_nano:nanorp2040connect
14+ programmer : p1
15+ platforms :
16+ - platform : arduino:mbed_nano (2.1.0)
17+
1218 another_profile_name :
1319 notes : testing the limit of the AVR platform, may be unstable
1420 fqbn : arduino:avr:uno
You can’t perform that action at this time.
0 commit comments