@@ -340,6 +340,47 @@ func TestBoardOptions(t *testing.T) {
340
340
// fmt.Print(string(data))
341
341
}
342
342
343
+ func TestOSSpecificBoardOptions (t * testing.T ) {
344
+ boardWihOSSpecificOptionProperties := properties .NewMap ()
345
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.115200" , "115200" )
346
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.115200.upload.speed" , "115200" )
347
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.9600" , "9600" )
348
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.9600.upload.speed" , "9600" )
349
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.57600" , "57600" )
350
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.57600.upload.speed" , "57600" )
351
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.230400" , "230400" )
352
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.230400.macosx" , "230400" )
353
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.230400.upload.speed" , "230400" )
354
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.256000.windows" , "256000" )
355
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.256000.upload.speed" , "256000" )
356
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.460800" , "460800" )
357
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.460800.macosx" , "460800" )
358
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.460800.upload.speed" , "460800" )
359
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.512000.windows" , "512000" )
360
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.512000.upload.speed" , "512000" )
361
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.921600" , "921600" )
362
+ boardWihOSSpecificOptionProperties .Set ("menu.UploadSpeed.921600.upload.speed" , "921600" )
363
+
364
+ boardWithOSSpecificOptions := & Board {
365
+ BoardID : "test" ,
366
+ Properties : boardWihOSSpecificOptionProperties ,
367
+ PlatformRelease : & PlatformRelease {
368
+ Platform : & Platform {
369
+ Architecture : "test" ,
370
+ Package : & Package {
371
+ Name : "test" ,
372
+ },
373
+ },
374
+ Menus : properties .NewFromHashmap (map [string ]string {
375
+ "UploadSpeed" : "Upload Speed" ,
376
+ }),
377
+ },
378
+ }
379
+
380
+ _ , err := boardWithOSSpecificOptions .GeneratePropertiesForConfiguration ("UploadSpeed=256000" )
381
+ require .Error (t , err )
382
+ }
383
+
343
384
func TestBoardMatching (t * testing.T ) {
344
385
brd01 := & Board {
345
386
Properties : properties .NewFromHashmap (map [string ]string {
0 commit comments