Debian Codegraph @

t/purl/types/generic-test.json

raw
1 {
2 "$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json",
3 "tests": [
4 {
5 "description": "Parse test for PURL type: generic",
6 "test_group": "base",
7 "test_type": "parse",
8 "input": "pkg:generic/[email protected]",
9 "expected_output": {
10 "type": "generic",
11 "namespace": null,
12 "name": "openssl",
13 "version": "1.1.10g",
14 "qualifiers": null,
15 "subpath": null
16 },
17 "expected_failure": false,
18 "expected_failure_reason": null
19 },
20 {
21 "description": "Roundtrip test for PURL type: generic",
22 "test_group": "base",
23 "test_type": "roundtrip",
24 "input": "pkg:generic/[email protected]",
25 "expected_output": "pkg:generic/[email protected]",
26 "expected_failure": false,
27 "expected_failure_reason": null
28 },
29 {
30 "description": "Build test for PURL type: generic",
31 "test_group": "base",
32 "test_type": "build",
33 "input": {
34 "type": "generic",
35 "namespace": null,
36 "name": "openssl",
37 "version": "1.1.10g",
38 "qualifiers": null,
39 "subpath": null
40 },
41 "expected_output": "pkg:generic/[email protected]",
42 "expected_failure": false,
43 "expected_failure_reason": null
44 },
45 {
46 "description": "Parse test for PURL type: generic",
47 "test_group": "base",
48 "test_type": "parse",
49 "input": "pkg:generic/[email protected]?download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz&checksum=sha256:de4d501267da",
50 "expected_output": {
51 "type": "generic",
52 "namespace": null,
53 "name": "openssl",
54 "version": "1.1.10g",
55 "qualifiers": {
56 "checksum": "sha256:de4d501267da",
57 "download_url": "https://openssl.org/source/openssl-1.1.0g.tar.gz"
58 },
59 "subpath": null
60 },
61 "expected_failure": false,
62 "expected_failure_reason": null
63 },
64 {
65 "description": "Roundtrip test for PURL type: generic",
66 "test_group": "base",
67 "test_type": "roundtrip",
68 "input": "pkg:generic/[email protected]?download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz&checksum=sha256:de4d501267da",
69 "expected_output": "pkg:generic/[email protected]?checksum=sha256:de4d501267da&download_url=https:%2F%2Fopenssl.org%2Fsource%2Fopenssl-1.1.0g.tar.gz",
70 "expected_failure": false,
71 "expected_failure_reason": null
72 },
73 {
74 "description": "Build test for PURL type: generic",
75 "test_group": "base",
76 "test_type": "build",
77 "input": {
78 "type": "generic",
79 "namespace": null,
80 "name": "openssl",
81 "version": "1.1.10g",
82 "qualifiers": {
83 "checksum": "sha256:de4d501267da",
84 "download_url": "https://openssl.org/source/openssl-1.1.0g.tar.gz"
85 },
86 "subpath": null
87 },
88 "expected_output": "pkg:generic/[email protected]?checksum=sha256:de4d501267da&download_url=https:%2F%2Fopenssl.org%2Fsource%2Fopenssl-1.1.0g.tar.gz",
89 "expected_failure": false,
90 "expected_failure_reason": null
91 },
92 {
93 "description": "Parse test for PURL type: generic",
94 "test_group": "base",
95 "test_type": "parse",
96 "input": "pkg:generic/bitwarderl?vcs_url=git%2Bhttps://git.fsfe.org/dxtr/bitwarderl%40cc55108da32",
97 "expected_output": {
98 "type": "generic",
99 "namespace": null,
100 "name": "bitwarderl",
101 "version": null,
102 "qualifiers": {
103 "vcs_url": "git+https://git.fsfe.org/dxtr/bitwarderl@cc55108da32"
104 },
105 "subpath": null
106 },
107 "expected_failure": false,
108 "expected_failure_reason": null
109 },
110 {
111 "description": "Roundtrip test for PURL type: generic",
112 "test_group": "base",
113 "test_type": "roundtrip",
114 "input": "pkg:generic/bitwarderl?vcs_url=git%2Bhttps://git.fsfe.org/dxtr/bitwarderl%40cc55108da32",
115 "expected_output": "pkg:generic/bitwarderl?vcs_url=git%2Bhttps:%2F%2Fgit.fsfe.org%2Fdxtr%2Fbitwarderl%40cc55108da32",
116 "expected_failure": false,
117 "expected_failure_reason": null
118 },
119 {
120 "description": "Build test for PURL type: generic",
121 "test_group": "base",
122 "test_type": "build",
123 "input": {
124 "type": "generic",
125 "namespace": null,
126 "name": "bitwarderl",
127 "version": null,
128 "qualifiers": {
129 "vcs_url": "git+https://git.fsfe.org/dxtr/bitwarderl@cc55108da32"
130 },
131 "subpath": null
132 },
133 "expected_output": "pkg:generic/bitwarderl?vcs_url=git%2Bhttps:%2F%2Fgit.fsfe.org%2Fdxtr%2Fbitwarderl%40cc55108da32",
134 "expected_failure": false,
135 "expected_failure_reason": null
136 }
137 ]
138 }