@@ -323,26 +323,22 @@ func TestUserLibs(t *testing.T) {
323
323
func TestSketchCommands (t * testing.T ) {
324
324
defer makeTempDataDir (t )()
325
325
defer makeTempSketchbookDir (t )()
326
- //var d []byte
327
- var exitCode int
328
326
defer useSharedDownloadDir (t )()
329
327
330
- exitCode , _ = executeWithArgs (t , "sketch" , "new" , "Test" )
328
+ exitCode , _ : = executeWithArgs (t , "sketch" , "new" , "Test" )
331
329
require .Zero (t , exitCode , "exit code" )
332
330
}
333
331
334
332
func TestLibDownloadAndInstall (t * testing.T ) {
335
333
defer makeTempDataDir (t )()
336
334
defer makeTempSketchbookDir (t )()
337
- var d []byte
338
- var exitCode int
339
335
defer useSharedDownloadDir (t )()
340
336
341
- exitCode , _ = executeWithArgs (t , "core" , "update-index" )
337
+ exitCode , _ : = executeWithArgs (t , "core" , "update-index" )
342
338
require .Zero (t , exitCode , "exit code" )
343
339
344
340
// Download inexistent
345
- exitCode , d = executeWithArgs (t , "lib" , "download" , "inexistentLibrary" , "--format" , "json" )
341
+ exitCode , d : = executeWithArgs (t , "lib" , "download" , "inexistentLibrary" , "--format" , "json" )
346
342
require .NotZero (t , exitCode , "exit code" )
347
343
require .Contains (t , string (d ), "library inexistentLibrary not found" )
348
344
@@ -576,11 +572,6 @@ func TestCoreCommands(t *testing.T) {
576
572
defer makeTempSketchbookDir (t )()
577
573
defer useSharedDownloadDir (t )()
578
574
579
- // Set staging dir to a temporary dir
580
- tmp , err := ioutil .TempDir (os .TempDir (), "test" )
581
- require .NoError (t , err , "making temporary staging dir" )
582
- defer os .RemoveAll (tmp )
583
-
584
575
updateCoreIndex (t )
585
576
AVR := "arduino:avr@" + detectLatestAVRCore (t )
586
577
0 commit comments