Skip to content

Commit 8425d79

Browse files
author
Massimiliano Pippi
authored
add a test for search all (#419)
1 parent 8f73b78 commit 8425d79

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ require (
4343
go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45
4444
golang.org/x/net v0.0.0-20190311183353-d8887717615a
4545
golang.org/x/text v0.3.0
46+
google.golang.org/appengine v1.4.0 // indirect
4647
google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d // indirect
4748
google.golang.org/grpc v1.21.1
4849
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect

Diff for: test/test_board.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ def test_core_listall(run_command):
4444
def test_core_search(run_command):
4545
url = "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/test_index.json"
4646
assert run_command("core update-index --additional-urls={}".format(url))
47-
# default search
47+
# list all
48+
result = run_command("core search")
49+
assert result.ok
50+
assert 3 < len(result.stdout.splitlines())
51+
result = run_command("core search --format json")
52+
assert result.ok
53+
data = json.loads(result.stdout)
54+
assert 1 < len(data)
55+
# search a specific core
4856
result = run_command("core search avr")
4957
assert result.ok
5058
assert 2 < len(result.stdout.splitlines())

0 commit comments

Comments
 (0)