Skip to content

Commit cc30ed2

Browse files
committed
Update SPDX tests with latest list version
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 22f578c commit cc30ed2

14 files changed

Lines changed: 331 additions & 154 deletions

File tree

tests/formattedcode/data/spdx/license_known/expected.rdf

Lines changed: 59 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,17 @@
11
{
22
"rdf:RDF": {
33
"ns1:SpdxDocument": {
4+
"ns1:name": {
5+
"@rdf:resource": "SPDX Document created by ScanCode Toolkit"
6+
},
47
"ns1:dataLicense": {
58
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
69
},
7-
"ns1:referencesFile": {
8-
"ns1:File": {
9-
"ns1:fileName": [
10-
"./scan/apache-2.0.LICENSE",
11-
"./scan/cc0-1.0.LICENSE"
12-
],
13-
"ns1:licenseConcluded": {
14-
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
15-
},
16-
"ns1:copyrightText": {
17-
"@rdf:resource": "http://spdx.org/rdf/terms#none"
18-
},
19-
"ns1:licenseInfoInFile": [
20-
{
21-
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
22-
},
23-
{
24-
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
25-
}
26-
],
27-
"ns1:checksum": [
28-
{
29-
"ns1:Checksum": {
30-
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
31-
"ns1:algorithm": "SHA1"
32-
}
33-
},
34-
{
35-
"ns1:Checksum": {
36-
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
37-
"ns1:algorithm": "SHA1"
38-
}
39-
}
40-
],
41-
"@rdf:about": "http://www.spdx.org/files#None"
42-
}
43-
},
4410
"ns1:describesPackage": {
4511
"ns1:Package": {
12+
"ns1:Package": {
13+
"@rdf:resource": "SPDXRef-001"
14+
},
4615
"ns1:downloadLocation": {
4716
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
4817
},
@@ -55,9 +24,6 @@
5524
"ns1:copyrightText": {
5625
"@rdf:resource": "http://spdx.org/rdf/terms#none"
5726
},
58-
"ns1:hasFile": {
59-
"@rdf:resource": "http://www.spdx.org/files#None"
60-
},
6127
"ns1:licenseInfoFromFiles": [
6228
{
6329
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
@@ -66,12 +32,64 @@
6632
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
6733
}
6834
],
35+
"ns1:hasFile": [
36+
{
37+
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-2"
38+
},
39+
{
40+
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-3"
41+
}
42+
],
6943
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-Package",
7044
"ns1:name": "scan"
7145
}
7246
},
47+
"ns1:referencesFile": [
48+
{
49+
"ns1:File": {
50+
"ns1:licenseInfoInFile": {
51+
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
52+
},
53+
"ns1:licenseConcluded": {
54+
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
55+
},
56+
"ns1:copyrightText": {
57+
"@rdf:resource": "http://spdx.org/rdf/terms#none"
58+
},
59+
"ns1:checksum": {
60+
"ns1:Checksum": {
61+
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
62+
"ns1:algorithm": "SHA1"
63+
}
64+
},
65+
"ns1:fileName": "./scan/apache-2.0.LICENSE",
66+
"@rdf:about": "http://www.spdx.org/files#SPDXRef-2"
67+
}
68+
},
69+
{
70+
"ns1:File": {
71+
"ns1:licenseInfoInFile": {
72+
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
73+
},
74+
"ns1:licenseConcluded": {
75+
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
76+
},
77+
"ns1:copyrightText": {
78+
"@rdf:resource": "http://spdx.org/rdf/terms#none"
79+
},
80+
"ns1:checksum": {
81+
"ns1:Checksum": {
82+
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
83+
"ns1:algorithm": "SHA1"
84+
}
85+
},
86+
"ns1:fileName": "./scan/cc0-1.0.LICENSE",
87+
"@rdf:about": "http://www.spdx.org/files#SPDXRef-3"
88+
}
89+
}
90+
],
7391
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-DOCUMENT",
74-
"ns1:specVersion": "SPDX-2.1"
92+
"ns1:specVersion": "SPDX-2.2"
7593
},
7694
"@xmlns:ns1": "http://spdx.org/rdf/terms#",
7795
"@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

tests/formattedcode/data/spdx/license_known/expected.tv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SPDXVersion: SPDX-2.2
33
DataLicense: CC0-1.0
44
DocumentNamespace: http://spdx.org/spdxdocs/scan
55
DocumentName: SPDX Document created by ScanCode Toolkit
6-
LicenseListVersion: 3.14
6+
LicenseListVersion: 3.15
77
SPDXID: SPDXRef-DOCUMENT
88
DocumentComment: <text>Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
99
OR CONDITIONS OF ANY KIND, either express or implied. No content created from

tests/formattedcode/data/spdx/license_known/expected_with_text.rdf

Lines changed: 59 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,17 @@
11
{
22
"rdf:RDF": {
33
"ns1:SpdxDocument": {
4+
"ns1:name": {
5+
"@rdf:resource": "SPDX Document created by ScanCode Toolkit"
6+
},
47
"ns1:dataLicense": {
58
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
69
},
7-
"ns1:referencesFile": {
8-
"ns1:File": {
9-
"ns1:fileName": [
10-
"./scan/apache-2.0.LICENSE",
11-
"./scan/cc0-1.0.LICENSE"
12-
],
13-
"ns1:licenseConcluded": {
14-
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
15-
},
16-
"ns1:copyrightText": {
17-
"@rdf:resource": "http://spdx.org/rdf/terms#none"
18-
},
19-
"ns1:licenseInfoInFile": [
20-
{
21-
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
22-
},
23-
{
24-
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
25-
}
26-
],
27-
"ns1:checksum": [
28-
{
29-
"ns1:Checksum": {
30-
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
31-
"ns1:algorithm": "SHA1"
32-
}
33-
},
34-
{
35-
"ns1:Checksum": {
36-
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
37-
"ns1:algorithm": "SHA1"
38-
}
39-
}
40-
],
41-
"@rdf:about": "http://www.spdx.org/files#None"
42-
}
43-
},
4410
"ns1:describesPackage": {
4511
"ns1:Package": {
12+
"ns1:Package": {
13+
"@rdf:resource": "SPDXRef-001"
14+
},
4615
"ns1:downloadLocation": {
4716
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
4817
},
@@ -55,9 +24,6 @@
5524
"ns1:copyrightText": {
5625
"@rdf:resource": "http://spdx.org/rdf/terms#none"
5726
},
58-
"ns1:hasFile": {
59-
"@rdf:resource": "http://www.spdx.org/files#None"
60-
},
6127
"ns1:licenseInfoFromFiles": [
6228
{
6329
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
@@ -66,12 +32,64 @@
6632
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
6733
}
6834
],
35+
"ns1:hasFile": [
36+
{
37+
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-2"
38+
},
39+
{
40+
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-3"
41+
}
42+
],
6943
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-Package",
7044
"ns1:name": "scan"
7145
}
7246
},
47+
"ns1:referencesFile": [
48+
{
49+
"ns1:File": {
50+
"ns1:licenseInfoInFile": {
51+
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
52+
},
53+
"ns1:licenseConcluded": {
54+
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
55+
},
56+
"ns1:copyrightText": {
57+
"@rdf:resource": "http://spdx.org/rdf/terms#none"
58+
},
59+
"ns1:checksum": {
60+
"ns1:Checksum": {
61+
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
62+
"ns1:algorithm": "SHA1"
63+
}
64+
},
65+
"ns1:fileName": "./scan/apache-2.0.LICENSE",
66+
"@rdf:about": "http://www.spdx.org/files#SPDXRef-2"
67+
}
68+
},
69+
{
70+
"ns1:File": {
71+
"ns1:licenseInfoInFile": {
72+
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
73+
},
74+
"ns1:licenseConcluded": {
75+
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
76+
},
77+
"ns1:copyrightText": {
78+
"@rdf:resource": "http://spdx.org/rdf/terms#none"
79+
},
80+
"ns1:checksum": {
81+
"ns1:Checksum": {
82+
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
83+
"ns1:algorithm": "SHA1"
84+
}
85+
},
86+
"ns1:fileName": "./scan/cc0-1.0.LICENSE",
87+
"@rdf:about": "http://www.spdx.org/files#SPDXRef-3"
88+
}
89+
}
90+
],
7391
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-DOCUMENT",
74-
"ns1:specVersion": "SPDX-2.1"
92+
"ns1:specVersion": "SPDX-2.2"
7593
},
7694
"@xmlns:ns1": "http://spdx.org/rdf/terms#",
7795
"@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

tests/formattedcode/data/spdx/license_known/expected_with_text.tv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SPDXVersion: SPDX-2.2
33
DataLicense: CC0-1.0
44
DocumentNamespace: http://spdx.org/spdxdocs/scan
55
DocumentName: SPDX Document created by ScanCode Toolkit
6-
LicenseListVersion: 3.14
6+
LicenseListVersion: 3.15
77
SPDXID: SPDXRef-DOCUMENT
88
DocumentComment: <text>Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
99
OR CONDITIONS OF ANY KIND, either express or implied. No content created from

tests/formattedcode/data/spdx/license_ref/expected.rdf

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"rdf:RDF": {
33
"ns1:SpdxDocument": {
4+
"ns1:name": {
5+
"@rdf:resource": "SPDX Document created by ScanCode Toolkit"
6+
},
47
"ns1:dataLicense": {
58
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
69
},
@@ -19,20 +22,23 @@
1922
{
2023
"ns1:ExtractedLicensingInfo": {
2124
"ns1:licenseId": "LicenseRef-scancode-other-copyleft",
25+
"ns1:licenseName": "Other Copyleft Licenses",
2226
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml",
2327
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml"
2428
}
2529
},
2630
{
2731
"ns1:ExtractedLicensingInfo": {
2832
"ns1:licenseId": "LicenseRef-scancode-other-permissive",
33+
"ns1:licenseName": "Other Permissive Licenses",
2934
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml",
3035
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml"
3136
}
3237
},
3338
{
3439
"ns1:ExtractedLicensingInfo": {
3540
"ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment",
41+
"ns1:licenseName": "ScanCode generated data acknowledgment",
3642
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml",
3743
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml"
3844
}
@@ -45,12 +51,15 @@
4551
}
4652
},
4753
"ns1:fileName": "./scan/NOTICE",
48-
"@rdf:about": "http://www.spdx.org/files#None",
54+
"@rdf:about": "http://www.spdx.org/files#SPDXRef-2",
4955
"ns1:copyrightText": "Copyright (c) 2017 nexB Inc. and others"
5056
}
5157
},
5258
"ns1:describesPackage": {
5359
"ns1:Package": {
60+
"ns1:Package": {
61+
"@rdf:resource": "SPDXRef-001"
62+
},
5463
"ns1:downloadLocation": {
5564
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
5665
},
@@ -61,7 +70,7 @@
6170
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
6271
},
6372
"ns1:hasFile": {
64-
"@rdf:resource": "http://www.spdx.org/files#None"
73+
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-2"
6574
},
6675
"ns1:licenseInfoFromFiles": [
6776
{
@@ -73,20 +82,23 @@
7382
{
7483
"ns1:ExtractedLicensingInfo": {
7584
"ns1:licenseId": "LicenseRef-scancode-other-copyleft",
85+
"ns1:licenseName": "Other Copyleft Licenses",
7686
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml",
7787
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml"
7888
}
7989
},
8090
{
8191
"ns1:ExtractedLicensingInfo": {
8292
"ns1:licenseId": "LicenseRef-scancode-other-permissive",
93+
"ns1:licenseName": "Other Permissive Licenses",
8394
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml",
8495
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml"
8596
}
8697
},
8798
{
8899
"ns1:ExtractedLicensingInfo": {
89100
"ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment",
101+
"ns1:licenseName": "ScanCode generated data acknowledgment",
90102
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml",
91103
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml"
92104
}
@@ -101,27 +113,30 @@
101113
{
102114
"ns1:ExtractedLicensingInfo": {
103115
"ns1:licenseId": "LicenseRef-scancode-other-copyleft",
116+
"ns1:licenseName": "Other Copyleft Licenses",
104117
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml",
105118
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml"
106119
}
107120
},
108121
{
109122
"ns1:ExtractedLicensingInfo": {
110123
"ns1:licenseId": "LicenseRef-scancode-other-permissive",
124+
"ns1:licenseName": "Other Permissive Licenses",
111125
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml",
112126
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml"
113127
}
114128
},
115129
{
116130
"ns1:ExtractedLicensingInfo": {
117131
"ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment",
132+
"ns1:licenseName": "ScanCode generated data acknowledgment",
118133
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml",
119134
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml"
120135
}
121136
}
122137
],
123138
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-DOCUMENT",
124-
"ns1:specVersion": "SPDX-2.1"
139+
"ns1:specVersion": "SPDX-2.2"
125140
},
126141
"@xmlns:ns1": "http://spdx.org/rdf/terms#",
127142
"@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",

0 commit comments

Comments
 (0)