| 1 |
{ |
| 2 |
"$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json", |
| 3 |
"tests": [ |
| 4 |
{ |
| 5 |
"description": "valid julia purl for stdlib package with version and uuid", |
| 6 |
"test_group": "base", |
| 7 |
"test_type": "parse", |
| 8 |
"input": "pkg:julia/[email protected]?uuid=ade2ca70-3891-5945-98fb-dc099432e06a", |
| 9 |
"expected_output": { |
| 10 |
"type": "julia", |
| 11 |
"namespace": null, |
| 12 |
"name": "Dates", |
| 13 |
"version": "1.9.0", |
| 14 |
"qualifiers": { |
| 15 |
"uuid": "ade2ca70-3891-5945-98fb-dc099432e06a" |
| 16 |
}, |
| 17 |
"subpath": null |
| 18 |
}, |
| 19 |
"expected_failure": false, |
| 20 |
"expected_failure_reason": null |
| 21 |
}, |
| 22 |
{ |
| 23 |
"description": "valid julia purl for stdlib package with uuid but no version", |
| 24 |
"test_group": "base", |
| 25 |
"test_type": "parse", |
| 26 |
"input": "pkg:julia/Dates?uuid=ade2ca70-3891-5945-98fb-dc099432e06a", |
| 27 |
"expected_output": { |
| 28 |
"type": "julia", |
| 29 |
"namespace": null, |
| 30 |
"name": "Dates", |
| 31 |
"version": null, |
| 32 |
"qualifiers": { |
| 33 |
"uuid": "ade2ca70-3891-5945-98fb-dc099432e06a" |
| 34 |
}, |
| 35 |
"subpath": null |
| 36 |
}, |
| 37 |
"expected_failure": false, |
| 38 |
"expected_failure_reason": null |
| 39 |
}, |
| 40 |
{ |
| 41 |
"description": "valid julia purl, version and uuid", |
| 42 |
"test_group": "base", |
| 43 |
"test_type": "parse", |
| 44 |
"input": "pkg:julia/[email protected]?uuid=fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc", |
| 45 |
"expected_output": { |
| 46 |
"type": "julia", |
| 47 |
"namespace": null, |
| 48 |
"name": "AWS", |
| 49 |
"version": "1.88.0", |
| 50 |
"qualifiers": { |
| 51 |
"uuid": "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc" |
| 52 |
}, |
| 53 |
"subpath": null |
| 54 |
}, |
| 55 |
"expected_failure": false, |
| 56 |
"expected_failure_reason": null |
| 57 |
}, |
| 58 |
{ |
| 59 |
"description": "valid julia purl with both uuid and repository_url qualifiers", |
| 60 |
"test_group": "base", |
| 61 |
"test_type": "parse", |
| 62 |
"input": "pkg:julia/[email protected]?repository_url=https://github.com/HolyLab/HolyLabRegistry&uuid=ac24ea0c-1830-11e9-18d4-81f172323054", |
| 63 |
"expected_output": { |
| 64 |
"type": "julia", |
| 65 |
"namespace": null, |
| 66 |
"name": "RegisterQD", |
| 67 |
"version": "0.3.1", |
| 68 |
"qualifiers": { |
| 69 |
"repository_url": "https://github.com/HolyLab/HolyLabRegistry", |
| 70 |
"uuid": "ac24ea0c-1830-11e9-18d4-81f172323054" |
| 71 |
}, |
| 72 |
"subpath": null |
| 73 |
}, |
| 74 |
"expected_failure": false, |
| 75 |
"expected_failure_reason": null |
| 76 |
}, |
| 77 |
{ |
| 78 |
"description": "valid julia purl build test - stdlib package with version and uuid", |
| 79 |
"test_group": "base", |
| 80 |
"test_type": "build", |
| 81 |
"input": { |
| 82 |
"type": "julia", |
| 83 |
"namespace": null, |
| 84 |
"name": "Dates", |
| 85 |
"version": "1.9.0", |
| 86 |
"qualifiers": { |
| 87 |
"uuid": "ade2ca70-3891-5945-98fb-dc099432e06a" |
| 88 |
}, |
| 89 |
"subpath": null |
| 90 |
}, |
| 91 |
"expected_output": "pkg:julia/[email protected]?uuid=ade2ca70-3891-5945-98fb-dc099432e06a", |
| 92 |
"expected_failure": false, |
| 93 |
"expected_failure_reason": null |
| 94 |
}, |
| 95 |
{ |
| 96 |
"description": "valid julia purl build test with both qualifiers", |
| 97 |
"test_group": "base", |
| 98 |
"test_type": "build", |
| 99 |
"input": { |
| 100 |
"type": "julia", |
| 101 |
"namespace": null, |
| 102 |
"name": "RegisterQD", |
| 103 |
"version": "0.3.1", |
| 104 |
"qualifiers": { |
| 105 |
"repository_url": "https://github.com/HolyLab/HolyLabRegistry", |
| 106 |
"uuid": "ac24ea0c-1830-11e9-18d4-81f172323054" |
| 107 |
}, |
| 108 |
"subpath": null |
| 109 |
}, |
| 110 |
"expected_output": "pkg:julia/[email protected]?repository_url=https:%2F%2Fgithub.com%2FHolyLab%2FHolyLabRegistry&uuid=ac24ea0c-1830-11e9-18d4-81f172323054", |
| 111 |
"expected_failure": false, |
| 112 |
"expected_failure_reason": null |
| 113 |
}, |
| 114 |
{ |
| 115 |
"description": "valid julia purl roundtrip test - basic package", |
| 116 |
"test_group": "base", |
| 117 |
"test_type": "roundtrip", |
| 118 |
"input": "pkg:julia/[email protected]?uuid=ade2ca70-3891-5945-98fb-dc099432e06a", |
| 119 |
"expected_output": "pkg:julia/[email protected]?uuid=ade2ca70-3891-5945-98fb-dc099432e06a", |
| 120 |
"expected_failure": false, |
| 121 |
"expected_failure_reason": null |
| 122 |
}, |
| 123 |
{ |
| 124 |
"description": "valid julia purl roundtrip test - multiple qualifiers", |
| 125 |
"test_group": "advanced", |
| 126 |
"test_type": "roundtrip", |
| 127 |
"input": "pkg:julia/[email protected]?repository_url=https://github.com/HolyLab/HolyLabRegistry&uuid=ac24ea0c-1830-11e9-18d4-81f172323054", |
| 128 |
"expected_output": "pkg:julia/[email protected]?repository_url=https:%2F%2Fgithub.com%2FHolyLab%2FHolyLabRegistry&uuid=ac24ea0c-1830-11e9-18d4-81f172323054", |
| 129 |
"expected_failure": false, |
| 130 |
"expected_failure_reason": null |
| 131 |
}, |
| 132 |
{ |
| 133 |
"description": "invalid julia purl without name", |
| 134 |
"test_group": "base", |
| 135 |
"test_type": "parse", |
| 136 |
"input": "pkg:julia/@1.9.0", |
| 137 |
"expected_output": null, |
| 138 |
"expected_failure": true, |
| 139 |
"expected_failure_reason": "Should fail to parse a PURL from invalid purl input" |
| 140 |
}, |
| 141 |
{ |
| 142 |
"description": "invalid julia purl with only type", |
| 143 |
"test_group": "base", |
| 144 |
"test_type": "parse", |
| 145 |
"input": "pkg:julia", |
| 146 |
"expected_output": null, |
| 147 |
"expected_failure": true, |
| 148 |
"expected_failure_reason": "Should fail to parse a PURL from invalid purl input" |
| 149 |
}, |
| 150 |
{ |
| 151 |
"description": "invalid julia purl build test - null name", |
| 152 |
"test_group": "base", |
| 153 |
"test_type": "build", |
| 154 |
"input": { |
| 155 |
"type": "julia", |
| 156 |
"namespace": null, |
| 157 |
"name": null, |
| 158 |
"version": "1.9.0", |
| 159 |
"qualifiers": { |
| 160 |
"uuid": "ade2ca70-3891-5945-98fb-dc099432e06a" |
| 161 |
}, |
| 162 |
"subpath": null |
| 163 |
}, |
| 164 |
"expected_output": null, |
| 165 |
"expected_failure": true, |
| 166 |
"expected_failure_reason": "Should fail to build a PURL from invalid input components" |
| 167 |
}, |
| 168 |
{ |
| 169 |
"description": "invalid julia purl build test - empty name", |
| 170 |
"test_group": "base", |
| 171 |
"test_type": "build", |
| 172 |
"input": { |
| 173 |
"type": "julia", |
| 174 |
"namespace": null, |
| 175 |
"name": "", |
| 176 |
"version": "1.9.0", |
| 177 |
"qualifiers": { |
| 178 |
"uuid": "ade2ca70-3891-5945-98fb-dc099432e06a" |
| 179 |
}, |
| 180 |
"subpath": null |
| 181 |
}, |
| 182 |
"expected_output": null, |
| 183 |
"expected_failure": true, |
| 184 |
"expected_failure_reason": "Should fail to build a PURL from invalid input components" |
| 185 |
}, |
| 186 |
{ |
| 187 |
"description": "invalid julia purl for package without uuid", |
| 188 |
"test_group": "base", |
| 189 |
"test_type": "parse", |
| 190 |
"input": "pkg:julia/Dates", |
| 191 |
"expected_output": null, |
| 192 |
"expected_failure": true, |
| 193 |
"expected_failure_reason": "Should fail to parse a PURL from invalid purl input" |
| 194 |
} |
| 195 |
] |
| 196 |
} |