Debian Codegraph @

testdata/purl-spec/tests/types/opam-test.json

raw symbols SCIP
1 {
2 "$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json",
3 "tests": [
4 {
5 "description": "valid opam purl. Roundtrip an input purl to canonical.",
6 "test_group": "advanced",
7 "test_type": "roundtrip",
8 "input": "pkg:opam/[email protected]",
9 "expected_output": "pkg:opam/[email protected]",
10 "expected_failure": false,
11 "expected_failure_reason": null
12 },
13 {
14 "description": "valid opam purl",
15 "test_group": "base",
16 "test_type": "parse",
17 "input": "pkg:opam/[email protected]",
18 "expected_output": {
19 "type": "opam",
20 "namespace": null,
21 "name": "conex",
22 "version": "1.0.0",
23 "qualifiers": null,
24 "subpath": null
25 },
26 "expected_failure": false,
27 "expected_failure_reason": null
28 },
29 {
30 "description": "valid opam purl. Roundtrip a canonical input to canonical output.",
31 "test_group": "base",
32 "test_type": "roundtrip",
33 "input": "pkg:opam/[email protected]",
34 "expected_output": "pkg:opam/[email protected]",
35 "expected_failure": false,
36 "expected_failure_reason": null
37 },
38 {
39 "description": "valid opam purl (name only)",
40 "test_group": "base",
41 "test_type": "build",
42 "input": {
43 "type": "opam",
44 "namespace": null,
45 "name": "conex",
46 "version": null,
47 "qualifiers": null,
48 "subpath": null
49 },
50 "expected_output": "pkg:opam/conex",
51 "expected_failure": false,
52 "expected_failure_reason": null
53 },
54 {
55 "description": "name is always required",
56 "test_group": "base",
57 "test_type": "build",
58 "input": {
59 "type": "opam",
60 "namespace": null,
61 "name": null,
62 "version": null,
63 "qualifiers": null,
64 "subpath": null
65 },
66 "expected_output": null,
67 "expected_failure": true,
68 "expected_failure_reason": "Should fail to build a PURL from invalid input components"
69 }
70 ]
71 }