Unverified Commit 8425d79b authored by Massimiliano Pippi's avatar Massimiliano Pippi Committed by GitHub

add a test for search all (#419)

parent 8f73b784
......@@ -43,6 +43,7 @@ require (
go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45
golang.org/x/net v0.0.0-20190311183353-d8887717615a
golang.org/x/text v0.3.0
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d // indirect
google.golang.org/grpc v1.21.1
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
......
......@@ -44,7 +44,15 @@ def test_core_listall(run_command):
def test_core_search(run_command):
url = "https://raw.githubusercontent.com/arduino/arduino-cli/master/test/testdata/test_index.json"
assert run_command("core update-index --additional-urls={}".format(url))
# default search
# list all
result = run_command("core search")
assert result.ok
assert 3 < len(result.stdout.splitlines())
result = run_command("core search --format json")
assert result.ok
data = json.loads(result.stdout)
assert 1 < len(data)
# search a specific core
result = run_command("core search avr")
assert result.ok
assert 2 < len(result.stdout.splitlines())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment