Skip to content

Commit cebcf7d

Browse files
committed
tests: extend/revisit example for expression-details
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent e97c3d3 commit cebcf7d

9 files changed

+15
-13
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@
3636
"bom-ref": "my-license",
3737
"acknowledgement": "declared",
3838
"expression": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
39-
"expression-details": {
39+
"expressionDetails": {
4040
"texts": [
4141
{
42-
"license-identifier": "EPL-2.0",
42+
"licenseIdentifier": "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..."
4444
},
4545
{
46-
"license-identifier": "GPL-2.0 WITH Classpath-exception-2.0",
46+
"licenseIdentifier": "GPL-2.0 WITH Classpath-exception-2.0",
47+
"contentType": "text/plain",
4748
"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..."
4849
}
4950
]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ components {
3535
expression_details {
3636
texts {
3737
license_identifier: "EPL-2.0"
38-
3938
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..."
4039
}
4140
texts {
4241
license_identifier: "GPL-2.0 WITH Classpath-exception-2.0",
42+
content_type: "text/plain",
4343
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..."
4444
}
4545
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
2424
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
2525
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT...]]]></text>
26-
<text license-identifier="GPL-2.0 WITH Classpath-exception-2.0"><![CDATA[ GNU GENERAL PUBLIC LICENSE
26+
<text license-identifier="GPL-2.0 WITH Classpath-exception-2.0"
27+
content-type="text/plain"
28+
><![CDATA[ GNU GENERAL PUBLIC LICENSE
2729
Version 2, June 1991
2830
2931
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"acknowledgement": "declared",
3939
"bom-ref": "my-license",
4040
"text": {
41+
"contentType": "text/plain",
4142
"content": "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION..."
4243
}
4344
}

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,8 @@ components {
3434
acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED
3535
bom_ref: "my-license"
3636
text {
37-
value: """
38-
Apache License
39-
Version 2.0, January 2004
40-
http://www.apache.org/licenses/
41-
42-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION..."""
37+
content_type: "text/plain",
38+
value: "\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION..."
4339
}
4440
}
4541
}

tools/src/test/resources/1.7/valid-license-id-with-text-1.7.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<licenses>
1818
<license bom-ref="my-license" acknowledgement="declared">
1919
<id>Apache-2.0</id>
20-
<text><![CDATA[
20+
<text content-type="text/plain"><![CDATA[
2121
Apache License
2222
Version 2.0, January 2004
2323
http://www.apache.org/licenses/

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"bom-ref": "my-license",
3939
"acknowledgement": "declared",
4040
"text": {
41+
"contentType": "text/plain",
4142
"content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nec turpis efficitur, ullamcorper lorem ac, fermentum nulla. Mauris a enim nunc. Aliquam diam tellus, porttitor venenatis leo in, mollis ultricies lacus. Sed sagittis hendrerit nulla, eget pulvinar diam..."
4243
}
4344
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ components {
3434
bom_ref: "my-license"
3535
acknowledgement: LICENSE_ACKNOWLEDGEMENT_ENUMERATION_DECLARED
3636
text {
37+
content_type: "text/plain",
3738
value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nec turpis efficitur, ullamcorper lorem ac, fermentum nulla. Mauris a enim nunc. Aliquam diam tellus, porttitor venenatis leo in, mollis ultricies lacus. Sed sagittis hendrerit nulla, eget pulvinar diam..."
3839
}
3940
}

tools/src/test/resources/1.7/valid-license-name-with-text-1.7.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<licenses>
1818
<license bom-ref="my-license" acknowledgement="declared">
1919
<name>My License</name>
20-
<text><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nec turpis efficitur, ullamcorper lorem ac, fermentum nulla. Mauris a enim nunc. Aliquam diam tellus, porttitor venenatis leo in, mollis ultricies lacus. Sed sagittis hendrerit nulla, eget pulvinar diam...]]></text>
20+
<text content-type="text/plain"><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nec turpis efficitur, ullamcorper lorem ac, fermentum nulla. Mauris a enim nunc. Aliquam diam tellus, porttitor venenatis leo in, mollis ultricies lacus. Sed sagittis hendrerit nulla, eget pulvinar diam...]]></text>
2121
</license>
2222
</licenses>
2323
<purl>pkg:maven/com.acme/[email protected]?packaging=jar</purl>

0 commit comments

Comments
 (0)