Skip to content

Commit

Permalink
Update SPDX tests with latest list version
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Nov 23, 2021
1 parent 22f578c commit cc30ed2
Show file tree
Hide file tree
Showing 14 changed files with 331 additions and 154 deletions.
100 changes: 59 additions & 41 deletions tests/formattedcode/data/spdx/license_known/expected.rdf
Original file line number Diff line number Diff line change
@@ -1,48 +1,17 @@
{
"rdf:RDF": {
"ns1:SpdxDocument": {
"ns1:name": {
"@rdf:resource": "SPDX Document created by ScanCode Toolkit"
},
"ns1:dataLicense": {
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
},
"ns1:referencesFile": {
"ns1:File": {
"ns1:fileName": [
"./scan/apache-2.0.LICENSE",
"./scan/cc0-1.0.LICENSE"
],
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:licenseInfoInFile": [
{
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
},
{
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
}
],
"ns1:checksum": [
{
"ns1:Checksum": {
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
"ns1:algorithm": "SHA1"
}
},
{
"ns1:Checksum": {
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
"ns1:algorithm": "SHA1"
}
}
],
"@rdf:about": "http://www.spdx.org/files#None"
}
},
"ns1:describesPackage": {
"ns1:Package": {
"ns1:Package": {
"@rdf:resource": "SPDXRef-001"
},
"ns1:downloadLocation": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
Expand All @@ -55,9 +24,6 @@
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:hasFile": {
"@rdf:resource": "http://www.spdx.org/files#None"
},
"ns1:licenseInfoFromFiles": [
{
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
Expand All @@ -66,12 +32,64 @@
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
}
],
"ns1:hasFile": [
{
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-2"
},
{
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-3"
}
],
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-Package",
"ns1:name": "scan"
}
},
"ns1:referencesFile": [
{
"ns1:File": {
"ns1:licenseInfoInFile": {
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
},
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:checksum": {
"ns1:Checksum": {
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
"ns1:algorithm": "SHA1"
}
},
"ns1:fileName": "./scan/apache-2.0.LICENSE",
"@rdf:about": "http://www.spdx.org/files#SPDXRef-2"
}
},
{
"ns1:File": {
"ns1:licenseInfoInFile": {
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
},
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:checksum": {
"ns1:Checksum": {
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
"ns1:algorithm": "SHA1"
}
},
"ns1:fileName": "./scan/cc0-1.0.LICENSE",
"@rdf:about": "http://www.spdx.org/files#SPDXRef-3"
}
}
],
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-DOCUMENT",
"ns1:specVersion": "SPDX-2.1"
"ns1:specVersion": "SPDX-2.2"
},
"@xmlns:ns1": "http://spdx.org/rdf/terms#",
"@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Expand Down
2 changes: 1 addition & 1 deletion tests/formattedcode/data/spdx/license_known/expected.tv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SPDXVersion: SPDX-2.2
DataLicense: CC0-1.0
DocumentNamespace: http://spdx.org/spdxdocs/scan
DocumentName: SPDX Document created by ScanCode Toolkit
LicenseListVersion: 3.14
LicenseListVersion: 3.15
SPDXID: SPDXRef-DOCUMENT
DocumentComment: <text>Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. No content created from
Expand Down
100 changes: 59 additions & 41 deletions tests/formattedcode/data/spdx/license_known/expected_with_text.rdf
Original file line number Diff line number Diff line change
@@ -1,48 +1,17 @@
{
"rdf:RDF": {
"ns1:SpdxDocument": {
"ns1:name": {
"@rdf:resource": "SPDX Document created by ScanCode Toolkit"
},
"ns1:dataLicense": {
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
},
"ns1:referencesFile": {
"ns1:File": {
"ns1:fileName": [
"./scan/apache-2.0.LICENSE",
"./scan/cc0-1.0.LICENSE"
],
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:licenseInfoInFile": [
{
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
},
{
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
}
],
"ns1:checksum": [
{
"ns1:Checksum": {
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
"ns1:algorithm": "SHA1"
}
},
{
"ns1:Checksum": {
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
"ns1:algorithm": "SHA1"
}
}
],
"@rdf:about": "http://www.spdx.org/files#None"
}
},
"ns1:describesPackage": {
"ns1:Package": {
"ns1:Package": {
"@rdf:resource": "SPDXRef-001"
},
"ns1:downloadLocation": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
Expand All @@ -55,9 +24,6 @@
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:hasFile": {
"@rdf:resource": "http://www.spdx.org/files#None"
},
"ns1:licenseInfoFromFiles": [
{
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
Expand All @@ -66,12 +32,64 @@
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
}
],
"ns1:hasFile": [
{
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-2"
},
{
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-3"
}
],
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-Package",
"ns1:name": "scan"
}
},
"ns1:referencesFile": [
{
"ns1:File": {
"ns1:licenseInfoInFile": {
"@rdf:resource": "http://spdx.org/licenses/Apache-2.0"
},
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:checksum": {
"ns1:Checksum": {
"ns1:checksumValue": "2b8b815229aa8a61e483fb4ba0588b8b6c491890",
"ns1:algorithm": "SHA1"
}
},
"ns1:fileName": "./scan/apache-2.0.LICENSE",
"@rdf:about": "http://www.spdx.org/files#SPDXRef-2"
}
},
{
"ns1:File": {
"ns1:licenseInfoInFile": {
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
},
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#none"
},
"ns1:checksum": {
"ns1:Checksum": {
"ns1:checksumValue": "172444e7c137eb5cd3cae530aca0879c90f7fada",
"ns1:algorithm": "SHA1"
}
},
"ns1:fileName": "./scan/cc0-1.0.LICENSE",
"@rdf:about": "http://www.spdx.org/files#SPDXRef-3"
}
}
],
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-DOCUMENT",
"ns1:specVersion": "SPDX-2.1"
"ns1:specVersion": "SPDX-2.2"
},
"@xmlns:ns1": "http://spdx.org/rdf/terms#",
"@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SPDXVersion: SPDX-2.2
DataLicense: CC0-1.0
DocumentNamespace: http://spdx.org/spdxdocs/scan
DocumentName: SPDX Document created by ScanCode Toolkit
LicenseListVersion: 3.14
LicenseListVersion: 3.15
SPDXID: SPDXRef-DOCUMENT
DocumentComment: <text>Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. No content created from
Expand Down
21 changes: 18 additions & 3 deletions tests/formattedcode/data/spdx/license_ref/expected.rdf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"rdf:RDF": {
"ns1:SpdxDocument": {
"ns1:name": {
"@rdf:resource": "SPDX Document created by ScanCode Toolkit"
},
"ns1:dataLicense": {
"@rdf:resource": "http://spdx.org/licenses/CC0-1.0"
},
Expand All @@ -19,20 +22,23 @@
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-other-copyleft",
"ns1:licenseName": "Other Copyleft Licenses",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml"
}
},
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-other-permissive",
"ns1:licenseName": "Other Permissive Licenses",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml"
}
},
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment",
"ns1:licenseName": "ScanCode generated data acknowledgment",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml"
}
Expand All @@ -45,12 +51,15 @@
}
},
"ns1:fileName": "./scan/NOTICE",
"@rdf:about": "http://www.spdx.org/files#None",
"@rdf:about": "http://www.spdx.org/files#SPDXRef-2",
"ns1:copyrightText": "Copyright (c) 2017 nexB Inc. and others"
}
},
"ns1:describesPackage": {
"ns1:Package": {
"ns1:Package": {
"@rdf:resource": "SPDXRef-001"
},
"ns1:downloadLocation": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
Expand All @@ -61,7 +70,7 @@
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
"ns1:hasFile": {
"@rdf:resource": "http://www.spdx.org/files#None"
"@rdf:resource": "http://www.spdx.org/files#SPDXRef-2"
},
"ns1:licenseInfoFromFiles": [
{
Expand All @@ -73,20 +82,23 @@
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-other-copyleft",
"ns1:licenseName": "Other Copyleft Licenses",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml"
}
},
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-other-permissive",
"ns1:licenseName": "Other Permissive Licenses",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml"
}
},
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment",
"ns1:licenseName": "ScanCode generated data acknowledgment",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml"
}
Expand All @@ -101,27 +113,30 @@
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-other-copyleft",
"ns1:licenseName": "Other Copyleft Licenses",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-copyleft.yml"
}
},
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-other-permissive",
"ns1:licenseName": "Other Permissive Licenses",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/other-permissive.yml"
}
},
{
"ns1:ExtractedLicensingInfo": {
"ns1:licenseId": "LicenseRef-scancode-scancode-acknowledgment",
"ns1:licenseName": "ScanCode generated data acknowledgment",
"ns1:extractedText": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml",
"rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/scancode-acknowledgment.yml"
}
}
],
"@rdf:about": "http://www.spdx.org/tools#SPDXRef-DOCUMENT",
"ns1:specVersion": "SPDX-2.1"
"ns1:specVersion": "SPDX-2.2"
},
"@xmlns:ns1": "http://spdx.org/rdf/terms#",
"@xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
Expand Down
Loading

0 comments on commit cc30ed2

Please sign in to comment.