Skip to content

Commit 5f658a8

Browse files
committed
Add tests for latest purl-spec
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 0defc22 commit 5f658a8

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

tests/data/test-suite-data.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,5 +382,65 @@
382382
"qualifiers": null,
383383
"subpath": "googleapis/api/annotations",
384384
"is_invalid": false
385+
},
386+
{
387+
"description": "basic valid alpm purl with arch qualifier",
388+
"purl": "pkg:alpm/arch/pacman@6.0.1-1?arch=x86_64",
389+
"canonical_purl": "pkg:alpm/arch/pacman@6.0.1-1?arch=x86_64",
390+
"type": "alpm",
391+
"namespace": "arch",
392+
"name": "pacman",
393+
"version": "6.0.1-1",
394+
"qualifiers": {"arch": "x86_64"},
395+
"subpath": null,
396+
"is_invalid": false
397+
},
398+
{
399+
"description": "valid with version containing epoch",
400+
"purl": "pkg:alpm/arch/containers-common@1:0.47.4-4?arch=x86_64",
401+
"canonical_purl": "pkg:alpm/arch/containers-common@1:0.47.4-4?arch=x86_64",
402+
"type": "alpm",
403+
"namespace": "arch",
404+
"name": "containers-common",
405+
"version": "1:0.47.4-4",
406+
"qualifiers": {"arch": "x86_64"},
407+
"subpath": null,
408+
"is_invalid": false
409+
},
410+
{
411+
"description": "valid with 'any' arch",
412+
"purl": "pkg:alpm/arch/python-pip@21.0-1?arch=any",
413+
"canonical_purl": "pkg:alpm/arch/python-pip@21.0-1?arch=any",
414+
"type": "alpm",
415+
"namespace": "arch",
416+
"name": "python-pip",
417+
"version": "21.0-1",
418+
"qualifiers": {"arch": "any"},
419+
"subpath": null,
420+
"is_invalid": false
421+
},
422+
{
423+
"description": "valid without qualifiers",
424+
"purl": "pkg:alpm/arch/bash@5.1.004-1",
425+
"canonical_purl": "pkg:alpm/arch/bash@5.1.004-1",
426+
"type": "alpm",
427+
"namespace": "arch",
428+
"name": "bash",
429+
"version": "5.1.004-1",
430+
"qualifiers": null,
431+
"subpath": null,
432+
"is_invalid": false
433+
},
434+
{
435+
"description": "missing type",
436+
"purl": "arch/bash@5.1.004-1?arch=x86_64",
437+
"canonical_purl": null,
438+
"type": null,
439+
"namespace": "arch",
440+
"name": "bash",
441+
"version": "5.1.004-1",
442+
"qualifiers": {"arch": "x86_64"},
443+
"subpath": null,
444+
"is_invalid": true
385445
}
386446
]

0 commit comments

Comments
 (0)