Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
cac851b4
Commit
cac851b4
authored
Aug 20, 2018
by
Cristian Maglie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more command tests for 'core upgrade' and 'core install'
parent
df7a4781
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
commands/commands_test.go
commands/commands_test.go
+15
-3
No files found.
commands/commands_test.go
View file @
cac851b4
...
...
@@ -363,6 +363,18 @@ func TestCoreCommands(t *testing.T) {
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"list"
)
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:avr@1.6.17"
)
require
.
Zero
(
t
,
exitCode
,
"exit code"
)
require
.
Contains
(
t
,
string
(
d
),
"Updating arduino:avr@1.6.16 with arduino:avr@1.6.17"
)
require
.
Contains
(
t
,
string
(
d
),
"arduino:avr@1.6.17 installed"
)
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"list"
)
require
.
Zero
(
t
,
exitCode
,
"exit code"
)
require
.
Contains
(
t
,
string
(
d
),
"arduino:avr"
)
require
.
Contains
(
t
,
string
(
d
),
"1.6.17"
)
// List updatable cores
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"list"
,
"--updatable"
)
...
...
@@ -370,9 +382,9 @@ func TestCoreCommands(t *testing.T) {
require
.
Contains
(
t
,
string
(
d
),
"arduino:avr"
)
// Upgrade platform
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"upgrade"
,
"arduino:avr@1.6.1
7
"
)
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"upgrade"
,
"arduino:avr@1.6.1
8
"
)
require
.
NotZero
(
t
,
exitCode
,
"exit code"
)
require
.
Contains
(
t
,
string
(
d
),
"Invalid item arduino:avr@1.6.1
7
"
)
require
.
Contains
(
t
,
string
(
d
),
"Invalid item arduino:avr@1.6.1
8
"
)
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"upgrade"
,
"other:avr"
)
require
.
NotZero
(
t
,
exitCode
,
"exit code"
)
...
...
@@ -384,7 +396,7 @@ func TestCoreCommands(t *testing.T) {
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"upgrade"
,
"arduino:avr"
)
require
.
Zero
(
t
,
exitCode
,
"exit code"
)
require
.
Contains
(
t
,
string
(
d
),
"Updating arduino:avr@1.6.1
6
with "
+
AVR
)
require
.
Contains
(
t
,
string
(
d
),
"Updating arduino:avr@1.6.1
7
with "
+
AVR
)
// List updatable cores
exitCode
,
d
=
executeWithArgs
(
t
,
"core"
,
"list"
,
"--updatable"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment