Skip to content

Commit 5462e66

Browse files
committed
tests: add latest features to test cases
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent bc3dda0 commit 5462e66

6 files changed

+116
-3
lines changed

tools/src/test/resources/1.7/valid-license-choice-1.7.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
"content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
3030
}
3131
}
32+
},
33+
{
34+
"expression": "LicenseRef-MIT-Style-2",
35+
"expressionDetails": [
36+
{
37+
"licenseIdentifier": "LicenseRef-MIT-Style-2",
38+
"url": "https://example.com/license"
39+
}
40+
]
3241
}
3342
]
3443
}

tools/src/test/resources/1.7/valid-license-choice-1.7.textproto

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,28 @@ components {
1616
description: "Modified version of Apache Catalina"
1717
scope: SCOPE_REQUIRED
1818
licenses {
19-
license: {
19+
license {
2020
id: "Apache-2.0"
2121
}
2222
}
2323
licenses {
2424
expression: "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0"
2525
}
2626
licenses {
27-
license: {
27+
license {
2828
name: "My Own License"
29-
text: {
29+
text {
3030
value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
3131
}
3232
}
3333
}
34+
licenses {
35+
expression_detailed {
36+
expression: "LicenseRef-MIT-Style-2"
37+
details {
38+
license_identifier: "LicenseRef-MIT-Style-2"
39+
url: "https://example.com/license"
40+
}
41+
}
42+
}
3443
}

tools/src/test/resources/1.7/valid-license-choice-1.7.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
<name>My Own License</name>
2121
<text><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]]></text>
2222
</license>
23+
<expression-detailed expression="LicenseRef-MIT-Style-2">
24+
<details license-identifier="LicenseRef-MIT-Style-2">
25+
<url>https://example.com/license</url>
26+
</details>
27+
</expression-detailed>
2328
</licenses>
2429
<purl>pkg:maven/com.acme/[email protected]?packaging=jar</purl>
2530
</component>

tools/src/test/resources/1.7/valid-license-declared-concluded-mix-1.7.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,42 @@
7474
}
7575
}
7676
]
77+
},
78+
{
79+
"type": "library",
80+
"group": "com.example",
81+
"name": "situation-D",
82+
"version": "1",
83+
"description": "Multiple license with texts: one declared expression, one concluded id",
84+
"licenses": [
85+
{
86+
"expression": "GPL-3.0-or-later OR GPL-2.0",
87+
"acknowledgement": "declared",
88+
"expressionDetails": [
89+
{
90+
"licenseIdentifier": "GPL-3.0-or-later",
91+
"text": {
92+
"content": "specific GPL-3.0-or-later license text"
93+
}
94+
},
95+
{
96+
"licenseIdentifier": "GPL-2.0",
97+
"text": {
98+
"content": "specific GPL-2.0 license text"
99+
}
100+
}
101+
]
102+
},
103+
{
104+
"license": {
105+
"id": "GPL-3.0-only",
106+
"acknowledgement": "concluded",
107+
"text": {
108+
"content": "specific GPL-3.0-or-later license text"
109+
}
110+
}
111+
}
112+
]
77113
}
78114
]
79115
}

tools/src/test/resources/1.7/valid-license-declared-concluded-mix-1.7.textproto

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,37 @@ components {
7171
}
7272
}
7373
}
74+
components {
75+
type: CLASSIFICATION_LIBRARY
76+
group: "com.example"
77+
name: "situation-D"
78+
version: "1"
79+
description: "Multiple license with texts: one declared expression, one concluded id"
80+
licenses {
81+
acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED
82+
expression_detailed {
83+
expression: "GPL-3.0-or-later OR GPL-2.0"
84+
details {
85+
license_identifier: "GPL-3.0-or-later"
86+
text {
87+
value: "specific GPL-3.0-or-later license text"
88+
}
89+
}
90+
details {
91+
license_identifier: "GPL-2.0"
92+
text {
93+
value: "specific GPL-2.0 license text"
94+
}
95+
}
96+
}
97+
}
98+
licenses {
99+
license: {
100+
id: "GPL-3.0-only"
101+
acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_CONCLUDED
102+
text {
103+
value: "specific GPL-3.0-or-later license text"
104+
}
105+
}
106+
}
107+
}

tools/src/test/resources/1.7/valid-license-declared-concluded-mix-1.7.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,25 @@
4242
<license acknowledgement="concluded"><id>GPL-3.0-only</id></license>
4343
</licenses>
4444
</component>
45+
<component type="library">
46+
<group>com.example</group>
47+
<name>situation-D</name>
48+
<version>1</version>
49+
<description>Multiple license with texts: one declared expression, one concluded id</description>
50+
<licenses>
51+
<expression-detailed expression="GPL-3.0-or-later OR GPL-2.0" acknowledgement="declared">
52+
<details license-identifier="GPL-3.0-or-later">
53+
<text>specific GPL-3.0-or-later license text</text>
54+
</details>
55+
<details license-identifier="GPL-2.0">
56+
<text>specific GPL-2.0 license text</text>
57+
</details>
58+
</expression-detailed>
59+
<license acknowledgement="concluded">
60+
<id>GPL-3.0-only</id>
61+
<text>specific GPL-3.0-or-later license text</text>
62+
</license>
63+
</licenses>
64+
</component>
4565
</components>
4666
</bom>

0 commit comments

Comments
 (0)