Skip to content

Commit e97c3d3

Browse files
committed
tests: examples for license expression details
as suggested in https://github.com/CycloneDX/specification/pull/599/files#r1965445439 Signed-off-by: Jan Kowalleck <[email protected]>
1 parent c1a6b33 commit e97c3d3

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

tools/src/test/resources/1.7/valid-license-expression-with-text-1.7.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,18 @@
3636
"bom-ref": "my-license",
3737
"acknowledgement": "declared",
3838
"expression": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
39-
"expression-texts": [
40-
{
41-
"license-identifier": "EPL-2.0",
42-
"text": {
39+
"expression-details": {
40+
"texts": [
41+
{
42+
"license-identifier": "EPL-2.0",
4343
"content": "Eclipse Public License - v 2.0\n\n THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE\n PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION\n OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT..."
44-
}
45-
},
46-
{
47-
"license-identifier": "GPL-2.0 WITH Classpath-exception-2.0",
48-
"text": {
44+
},
45+
{
46+
"license-identifier": "GPL-2.0 WITH Classpath-exception-2.0",
4947
"content": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed...\n\n...\n\nLinking this library statically or dynamically with other modules is making a combined work based on this library..."
5048
}
51-
}
52-
]
49+
]
50+
}
5351
}
5452
],
5553
"purl": "pkg:maven/com.acme/[email protected]?packaging=jar"

tools/src/test/resources/1.7/valid-license-expression-with-text-1.7.textproto

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@ components {
3232
bom_ref: "my-license"
3333
acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED
3434
expression: "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0"
35-
expression_texts {
36-
license_identifier: "EPL-2.0"
37-
text {
35+
expression_details {
36+
texts {
37+
license_identifier: "EPL-2.0"
38+
3839
content: "Eclipse Public License - v 2.0\n\n THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE\n PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION\n OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT..."
3940
}
40-
}
41-
expression_texts {
42-
license_identifier: "GPL-2.0 WITH Classpath-exception-2.0",
43-
text: {
41+
texts {
42+
license_identifier: "GPL-2.0 WITH Classpath-exception-2.0",
4443
content: " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed...\n\n...\n\nLinking this library statically or dynamically with other modules is making a combined work based on this library..."
4544
}
4645
}

0 commit comments

Comments
 (0)