Skip to content

Commit 5f2d04f

Browse files
committed
Added test for 'core list' json output
1 parent e4048f2 commit 5f2d04f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: commands/commands_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@ func TestCoreCommands(t *testing.T) {
422422
require.Contains(t, string(d), "arduino:avr")
423423
require.Contains(t, string(d), "1.6.16")
424424

425+
exitCode, d = executeWithArgs(t, "core", "list", "--format", "json")
426+
require.Zero(t, exitCode, "exit code")
427+
require.Contains(t, string(d), "arduino:avr")
428+
require.Contains(t, string(d), "1.6.16")
429+
425430
// Replace avr with 1.6.17
426431
exitCode, d = executeWithArgs(t, "core", "install", "arduino:[email protected]")
427432
require.Zero(t, exitCode, "exit code")
@@ -438,6 +443,10 @@ func TestCoreCommands(t *testing.T) {
438443
require.Zero(t, exitCode, "exit code")
439444
require.Contains(t, string(d), "arduino:avr")
440445

446+
exitCode, d = executeWithArgs(t, "core", "list", "--updatable", "--format", "json")
447+
require.Zero(t, exitCode, "exit code")
448+
require.Contains(t, string(d), "arduino:avr")
449+
441450
// Upgrade platform
442451
exitCode, d = executeWithArgs(t, "core", "upgrade", "arduino:[email protected]")
443452
require.NotZero(t, exitCode, "exit code")

0 commit comments

Comments
 (0)