Skip to content

Commit

Permalink
Added test for 'core list' json output
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Sep 24, 2018
1 parent e4048f2 commit 5f2d04f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@ func TestCoreCommands(t *testing.T) {
require.Contains(t, string(d), "arduino:avr")
require.Contains(t, string(d), "1.6.16")

exitCode, d = executeWithArgs(t, "core", "list", "--format", "json")
require.Zero(t, exitCode, "exit code")
require.Contains(t, string(d), "arduino:avr")
require.Contains(t, string(d), "1.6.16")

// Replace avr with 1.6.17
exitCode, d = executeWithArgs(t, "core", "install", "arduino:[email protected]")
require.Zero(t, exitCode, "exit code")
Expand All @@ -438,6 +443,10 @@ func TestCoreCommands(t *testing.T) {
require.Zero(t, exitCode, "exit code")
require.Contains(t, string(d), "arduino:avr")

exitCode, d = executeWithArgs(t, "core", "list", "--updatable", "--format", "json")
require.Zero(t, exitCode, "exit code")
require.Contains(t, string(d), "arduino:avr")

// Upgrade platform
exitCode, d = executeWithArgs(t, "core", "upgrade", "arduino:[email protected]")
require.NotZero(t, exitCode, "exit code")
Expand Down

0 comments on commit 5f2d04f

Please sign in to comment.