Debian Codegraph @

t/purl/types/github-test.json

raw
1 {
2 "$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json",
3 "tests": [
4 {
5 "description": "github namespace and name should be lowercased. Roundtrip an input purl to canonical.",
6 "test_group": "advanced",
7 "test_type": "roundtrip",
8 "input": "pkg:github/Package-url/purl-Spec@244fd47e07d1004f0aed9c",
9 "expected_output": "pkg:github/package-url/purl-spec@244fd47e07d1004f0aed9c",
10 "expected_failure": false,
11 "expected_failure_reason": null
12 },
13 {
14 "description": "github namespace and name should be lowercased",
15 "test_group": "base",
16 "test_type": "parse",
17 "input": "pkg:github/Package-url/purl-Spec@244fd47e07d1004f0aed9c",
18 "expected_output": {
19 "type": "github",
20 "namespace": "package-url",
21 "name": "purl-spec",
22 "version": "244fd47e07d1004f0aed9c",
23 "qualifiers": null,
24 "subpath": null
25 },
26 "expected_failure": false,
27 "expected_failure_reason": null
28 },
29 {
30 "description": "github namespace and name should be lowercased. Roundtrip a canonical input to canonical output.",
31 "test_group": "base",
32 "test_type": "roundtrip",
33 "input": "pkg:github/package-url/purl-spec@244fd47e07d1004f0aed9c",
34 "expected_output": "pkg:github/package-url/purl-spec@244fd47e07d1004f0aed9c",
35 "expected_failure": false,
36 "expected_failure_reason": null
37 },
38 {
39 "description": "github namespace and name should be lowercased",
40 "test_group": "base",
41 "test_type": "build",
42 "input": {
43 "type": "github",
44 "namespace": "package-url",
45 "name": "purl-spec",
46 "version": "244fd47e07d1004f0aed9c",
47 "qualifiers": null,
48 "subpath": null
49 },
50 "expected_output": "pkg:github/package-url/purl-spec@244fd47e07d1004f0aed9c",
51 "expected_failure": false,
52 "expected_failure_reason": null
53 },
54 {
55 "description": "Parse test for PURL type: github",
56 "test_group": "base",
57 "test_type": "parse",
58 "input": "pkg:github/package-url/purl-spec@244fd47e07d1004",
59 "expected_output": {
60 "type": "github",
61 "namespace": "package-url",
62 "name": "purl-spec",
63 "version": "244fd47e07d1004",
64 "qualifiers": null,
65 "subpath": null
66 },
67 "expected_failure": false,
68 "expected_failure_reason": null
69 },
70 {
71 "description": "Roundtrip test for PURL type: github",
72 "test_group": "base",
73 "test_type": "roundtrip",
74 "input": "pkg:github/package-url/purl-spec@244fd47e07d1004",
75 "expected_output": "pkg:github/package-url/purl-spec@244fd47e07d1004",
76 "expected_failure": false,
77 "expected_failure_reason": null
78 },
79 {
80 "description": "Build test for PURL type: github",
81 "test_group": "base",
82 "test_type": "build",
83 "input": {
84 "type": "github",
85 "namespace": "package-url",
86 "name": "purl-spec",
87 "version": "244fd47e07d1004",
88 "qualifiers": null,
89 "subpath": null
90 },
91 "expected_output": "pkg:github/package-url/purl-spec@244fd47e07d1004",
92 "expected_failure": false,
93 "expected_failure_reason": null
94 },
95 {
96 "description": "Parse test for PURL type: github",
97 "test_group": "base",
98 "test_type": "parse",
99 "input": "pkg:github/package-url/purl-spec@244fd47e07d1004#everybody/loves/dogs",
100 "expected_output": {
101 "type": "github",
102 "namespace": "package-url",
103 "name": "purl-spec",
104 "version": "244fd47e07d1004",
105 "qualifiers": null,
106 "subpath": "everybody/loves/dogs"
107 },
108 "expected_failure": false,
109 "expected_failure_reason": null
110 },
111 {
112 "description": "Roundtrip test for PURL type: github",
113 "test_group": "base",
114 "test_type": "roundtrip",
115 "input": "pkg:github/package-url/purl-spec@244fd47e07d1004#everybody/loves/dogs",
116 "expected_output": "pkg:github/package-url/purl-spec@244fd47e07d1004#everybody/loves/dogs",
117 "expected_failure": false,
118 "expected_failure_reason": null
119 },
120 {
121 "description": "Build test for PURL type: github",
122 "test_group": "base",
123 "test_type": "build",
124 "input": {
125 "type": "github",
126 "namespace": "package-url",
127 "name": "purl-spec",
128 "version": "244fd47e07d1004",
129 "qualifiers": null,
130 "subpath": "everybody/loves/dogs"
131 },
132 "expected_output": "pkg:github/package-url/purl-spec@244fd47e07d1004#everybody/loves/dogs",
133 "expected_failure": false,
134 "expected_failure_reason": null
135 }
136 ]
137 }