| 1 | { |
| 2 | "$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json", |
| 3 | "tests": [ |
| 4 | { |
| 5 | "description": "Parse test for PURL type: swid", |
| 6 | "test_group": "advanced", |
| 7 | "test_type": "parse", |
| 8 | "input": "pkg:swid/Acme/example.com/[email protected]?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d", |
| 9 | "expected_output": { |
| 10 | "type": "swid", |
| 11 | "namespace": "Acme/example.com", |
| 12 | "name": "Enterprise+Server", |
| 13 | "version": "1.0.0", |
| 14 | "qualifiers": { |
| 15 | "tag_id": "75b8c285-fa7b-485b-b199-4745e3004d0d" |
| 16 | }, |
| 17 | "subpath": null |
| 18 | }, |
| 19 | "expected_failure": false, |
| 20 | "expected_failure_reason": null |
| 21 | }, |
| 22 | { |
| 23 | "description": "Roundtrip test for PURL type: swid", |
| 24 | "test_group": "advanced", |
| 25 | "test_type": "roundtrip", |
| 26 | "input": "pkg:swid/Acme/example.com/[email protected]?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d", |
| 27 | "expected_output": "pkg:swid/Acme/example.com/Enterprise%[email protected]?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d", |
| 28 | "expected_failure": false, |
| 29 | "expected_failure_reason": null |
| 30 | }, |
| 31 | { |
| 32 | "description": "Build test for PURL type: swid", |
| 33 | "test_group": "advanced", |
| 34 | "test_type": "build", |
| 35 | "input": { |
| 36 | "type": "swid", |
| 37 | "namespace": "Acme/example.com", |
| 38 | "name": "Enterprise+Server", |
| 39 | "version": "1.0.0", |
| 40 | "qualifiers": { |
| 41 | "tag_id": "75b8c285-fa7b-485b-b199-4745e3004d0d" |
| 42 | }, |
| 43 | "subpath": null |
| 44 | }, |
| 45 | "expected_output": "pkg:swid/Acme/example.com/Enterprise%[email protected]?tag_id=75b8c285-fa7b-485b-b199-4745e3004d0d", |
| 46 | "expected_failure": false, |
| 47 | "expected_failure_reason": null |
| 48 | }, |
| 49 | { |
| 50 | "description": "Parse test for PURL type: swid", |
| 51 | "test_group": "base", |
| 52 | "test_type": "parse", |
| 53 | "input": "pkg:swid/Fedora@29?tag_id=org.fedoraproject.Fedora-29", |
| 54 | "expected_output": { |
| 55 | "type": "swid", |
| 56 | "namespace": null, |
| 57 | "name": "Fedora", |
| 58 | "version": "29", |
| 59 | "qualifiers": { |
| 60 | "tag_id": "org.fedoraproject.Fedora-29" |
| 61 | }, |
| 62 | "subpath": null |
| 63 | }, |
| 64 | "expected_failure": false, |
| 65 | "expected_failure_reason": null |
| 66 | }, |
| 67 | { |
| 68 | "description": "Roundtrip test for PURL type: swid", |
| 69 | "test_group": "base", |
| 70 | "test_type": "roundtrip", |
| 71 | "input": "pkg:swid/Fedora@29?tag_id=org.fedoraproject.Fedora-29", |
| 72 | "expected_output": "pkg:swid/Fedora@29?tag_id=org.fedoraproject.Fedora-29", |
| 73 | "expected_failure": false, |
| 74 | "expected_failure_reason": null |
| 75 | }, |
| 76 | { |
| 77 | "description": "Build test for PURL type: swid", |
| 78 | "test_group": "base", |
| 79 | "test_type": "build", |
| 80 | "input": { |
| 81 | "type": "swid", |
| 82 | "namespace": null, |
| 83 | "name": "Fedora", |
| 84 | "version": "29", |
| 85 | "qualifiers": { |
| 86 | "tag_id": "org.fedoraproject.Fedora-29" |
| 87 | }, |
| 88 | "subpath": null |
| 89 | }, |
| 90 | "expected_output": "pkg:swid/Fedora@29?tag_id=org.fedoraproject.Fedora-29", |
| 91 | "expected_failure": false, |
| 92 | "expected_failure_reason": null |
| 93 | }, |
| 94 | { |
| 95 | "description": "Parse test for PURL type: swid", |
| 96 | "test_group": "advanced", |
| 97 | "test_type": "parse", |
| 98 | "input": "pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL", |
| 99 | "expected_output": { |
| 100 | "type": "swid", |
| 101 | "namespace": "Adobe+Systems+Incorporated", |
| 102 | "name": "Adobe+InDesign", |
| 103 | "version": "CC", |
| 104 | "qualifiers": { |
| 105 | "tag_id": "CreativeCloud-CS6-Win-GM-MUL" |
| 106 | }, |
| 107 | "subpath": null |
| 108 | }, |
| 109 | "expected_failure": false, |
| 110 | "expected_failure_reason": null |
| 111 | }, |
| 112 | { |
| 113 | "description": "Roundtrip test for PURL type: swid", |
| 114 | "test_group": "advanced", |
| 115 | "test_type": "roundtrip", |
| 116 | "input": "pkg:swid/Adobe+Systems+Incorporated/Adobe+InDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL", |
| 117 | "expected_output": "pkg:swid/Adobe%2BSystems%2BIncorporated/Adobe%2BInDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL", |
| 118 | "expected_failure": false, |
| 119 | "expected_failure_reason": null |
| 120 | }, |
| 121 | { |
| 122 | "description": "Build test for PURL type: swid", |
| 123 | "test_group": "advanced", |
| 124 | "test_type": "build", |
| 125 | "input": { |
| 126 | "type": "swid", |
| 127 | "namespace": "Adobe+Systems+Incorporated", |
| 128 | "name": "Adobe+InDesign", |
| 129 | "version": "CC", |
| 130 | "qualifiers": { |
| 131 | "tag_id": "CreativeCloud-CS6-Win-GM-MUL" |
| 132 | }, |
| 133 | "subpath": null |
| 134 | }, |
| 135 | "expected_output": "pkg:swid/Adobe%2BSystems%2BIncorporated/Adobe%2BInDesign@CC?tag_id=CreativeCloud-CS6-Win-GM-MUL", |
| 136 | "expected_failure": false, |
| 137 | "expected_failure_reason": null |
| 138 | } |
| 139 | ] |
| 140 | } |