@@ -48,7 +48,17 @@ func TestCorrectHandlingOfPlatformVersionProperty(t *testing.T) {
48
48
// Trigger problematic call
49
49
out , _ , err := cli .Run ("core" , "list" , "--format" , "json" )
50
50
require .NoError (t , err )
51
- requirejson .Contains (t , out , `[{"id":"DxCore-dev:megaavr","installed_version":"1.4.10","name":"DxCore"}]` )
51
+ requirejson .Contains (t , out , `[
52
+ {
53
+ "id":"DxCore-dev:megaavr",
54
+ "installed_version":"1.4.10",
55
+ "releases": {
56
+ "1.4.10": {
57
+ "name":"DxCore"
58
+ }
59
+ }
60
+ }
61
+ ]` )
52
62
}
53
63
54
64
func TestCoreSearch (t * testing.T ) {
@@ -919,25 +929,25 @@ func TestCoreWithMissingCustomBoardOptionsIsLoaded(t *testing.T) {
919
929
require .NoError (t , err )
920
930
requirejson .Len (t , stdout , 1 )
921
931
// Verifies platform is loaded except excluding board with missing options
922
- requirejson .Contains (t , stdout , `[
923
- {
924
- "id": "arduino-beta-dev:platform_with_missing_custom_board_options"
925
- }
926
- ]` )
927
- requirejson .Query (t , stdout , ".[] | select(.id == \" arduino-beta-dev:platform_with_missing_custom_board_options\" ) | .boards | length" , "2" )
932
+ requirejson .Contains (t , stdout , `[{"id": "arduino-beta-dev:platform_with_missing_custom_board_options"}]` )
933
+ requirejson .Query (t , stdout , ".[] | select(.id == \" arduino-beta-dev:platform_with_missing_custom_board_options\" ) | .releases[.installed_version].boards | length" , "2" )
928
934
// Verify board with malformed options is not loaded
929
935
// while other board is loaded
930
936
requirejson .Contains (t , stdout , `[
931
937
{
932
938
"id": "arduino-beta-dev:platform_with_missing_custom_board_options",
933
- "boards": [
934
- {
935
- "fqbn": "arduino-beta-dev:platform_with_missing_custom_board_options:nessuno"
936
- },
937
- {
938
- "fqbn": "arduino-beta-dev:platform_with_missing_custom_board_options:altra"
939
+ "releases": {
940
+ "4.2.0": {
941
+ "boards": [
942
+ {
943
+ "fqbn": "arduino-beta-dev:platform_with_missing_custom_board_options:nessuno"
944
+ },
945
+ {
946
+ "fqbn": "arduino-beta-dev:platform_with_missing_custom_board_options:altra"
947
+ }
948
+ ]
939
949
}
940
- ]
950
+ }
941
951
}
942
952
]` )
943
953
}
0 commit comments