forked from arduino/arduino-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On core uninstall consider unversioned args as the installed, not the…
… latest Otherwise the command arduino-cli core unistall arduino:avr will fail with: arduino:[email protected] is not installed if the installed core it's an earlier version than 1.6.20
- Loading branch information
Showing
2 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,15 +355,20 @@ func TestCoreCommands(t *testing.T) { | |
require.Zero(t, exitCode, "exit code") | ||
require.Empty(t, strings.TrimSpace(string(d))) | ||
|
||
// Install avr | ||
exitCode, d = executeWithArgs(t, "core", "install", "arduino:avr") | ||
// Install avr 1.6.16 | ||
exitCode, d = executeWithArgs(t, "core", "install", "arduino:avr@1.6.16") | ||
require.Zero(t, exitCode, "exit code") | ||
require.Contains(t, string(d), AVR+" installed") | ||
require.Contains(t, string(d), "arduino:[email protected] installed") | ||
|
||
exitCode, d = executeWithArgs(t, "core", "list") | ||
require.Zero(t, exitCode, "exit code") | ||
require.Contains(t, string(d), "arduino:avr") | ||
|
||
// List updatable cores | ||
exitCode, d = executeWithArgs(t, "core", "list", "--updatable") | ||
require.Zero(t, exitCode, "exit code") | ||
require.Contains(t, string(d), "arduino:avr") | ||
|
||
// Build sketch for arduino:avr:uno | ||
exitCode, d = executeWithArgs(t, "sketch", "new", "Test1") | ||
require.Zero(t, exitCode, "exit code") | ||
|
@@ -376,7 +381,7 @@ func TestCoreCommands(t *testing.T) { | |
// Uninstall arduino:avr | ||
exitCode, d = executeWithArgs(t, "core", "uninstall", "arduino:avr") | ||
require.Zero(t, exitCode, "exit code") | ||
require.Contains(t, string(d), AVR+" uninstalled") | ||
require.Contains(t, string(d), "arduino:[email protected] uninstalled") | ||
|
||
// Empty cores list | ||
exitCode, d = executeWithArgs(t, "core", "list") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters