|
| 1 | +// This file is part of arduino-cli. |
| 2 | +// |
| 3 | +// Copyright 2022 ARDUINO SA (http://www.arduino.cc/) |
| 4 | +// |
| 5 | +// This software is released under the GNU General Public License version 3, |
| 6 | +// which covers the main part of arduino-cli. |
| 7 | +// The terms of this license can be found at: |
| 8 | +// https://www.gnu.org/licenses/gpl-3.0.en.html |
| 9 | +// |
| 10 | +// You can be released from the requirements of the above licenses by purchasing |
| 11 | +// a commercial license. Buying such a license is mandatory if you want to |
| 12 | +// modify or otherwise use the software for commercial activities involving the |
| 13 | +// Arduino software without disclosing the source code of your own applications. |
| 14 | +// To purchase a commercial license, send an email to license@arduino.cc. |
| 15 | + |
| 16 | +package board_test |
| 17 | + |
| 18 | +import ( |
| 19 | + "testing" |
| 20 | + |
| 21 | + "github.com/arduino/arduino-cli/internal/integrationtest" |
| 22 | + "github.com/stretchr/testify/require" |
| 23 | + "go.bug.st/testifyjson/requirejson" |
| 24 | +) |
| 25 | + |
| 26 | +func TestCorrectBoardListOrdering(t *testing.T) { |
| 27 | + env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) |
| 28 | + defer env.CleanUp() |
| 29 | + |
| 30 | + _, _, err := cli.Run("core", "install", "arduino:avr") |
| 31 | + require.NoError(t, err) |
| 32 | + jsonOut, _, err := cli.Run("board", "listall", "--format", "json") |
| 33 | + require.NoError(t, err) |
| 34 | + requirejson.Query(t, jsonOut, "[.boards[] | .fqbn]", `[ |
| 35 | + "arduino:avr:yun", |
| 36 | + "arduino:avr:uno", |
| 37 | + "arduino:avr:unomini", |
| 38 | + "arduino:avr:diecimila", |
| 39 | + "arduino:avr:nano", |
| 40 | + "arduino:avr:mega", |
| 41 | + "arduino:avr:megaADK", |
| 42 | + "arduino:avr:leonardo", |
| 43 | + "arduino:avr:leonardoeth", |
| 44 | + "arduino:avr:micro", |
| 45 | + "arduino:avr:esplora", |
| 46 | + "arduino:avr:mini", |
| 47 | + "arduino:avr:ethernet", |
| 48 | + "arduino:avr:fio", |
| 49 | + "arduino:avr:bt", |
| 50 | + "arduino:avr:LilyPadUSB", |
| 51 | + "arduino:avr:lilypad", |
| 52 | + "arduino:avr:pro", |
| 53 | + "arduino:avr:atmegang", |
| 54 | + "arduino:avr:robotControl", |
| 55 | + "arduino:avr:robotMotor", |
| 56 | + "arduino:avr:gemma", |
| 57 | + "arduino:avr:circuitplay32u4cat", |
| 58 | + "arduino:avr:yunmini", |
| 59 | + "arduino:avr:chiwawa", |
| 60 | + "arduino:avr:one", |
| 61 | + "arduino:avr:unowifi" |
| 62 | + ]`) |
| 63 | +} |
0 commit comments