Debian Codegraph @

t/purl/types/otp-test.json

raw
1 {
2 "$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json",
3 "tests": [
4 {
5 "description": "Parse test for <class 'type'> PURL",
6 "test_group": "base",
7 "test_type": "parse",
8 "input": "pkg:otp/[email protected]?arch=amd64&platform=linux&repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git#src/asn1ct.erl",
9 "expected_output": {
10 "type": "otp",
11 "namespace": null,
12 "name": "asn1",
13 "version": "5.4.1",
14 "qualifiers": {
15 "platform": "linux",
16 "arch": "amd64",
17 "repository_url": "https://github.com/erlang/otp",
18 "vcs_url": "git+https://github.com/erlang/otp.git"
19 },
20 "subpath": "src/asn1ct.erl"
21 },
22 "expected_failure": false,
23 "expected_failure_reason": null
24 },
25 {
26 "description": "Roundtrip test for <class 'type'> PURL",
27 "test_group": "base",
28 "test_type": "roundtrip",
29 "input": "pkg:otp/[email protected]?arch=amd64&platform=linux&repository_url=https://github.com/erlang/otp&vcs_url=git%2Bhttps://github.com/erlang/otp.git#src/asn1ct.erl",
30 "expected_output": "pkg:otp/[email protected]?arch=amd64&platform=linux&repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git#src/asn1ct.erl",
31 "expected_failure": false,
32 "expected_failure_reason": null
33 },
34 {
35 "description": "Build test for <class 'type'> PURL",
36 "test_group": "base",
37 "test_type": "build",
38 "input": {
39 "type": "otp",
40 "namespace": null,
41 "name": "asn1",
42 "version": "5.4.1",
43 "qualifiers": {
44 "platform": "linux",
45 "arch": "amd64",
46 "repository_url": "https://github.com/erlang/otp",
47 "vcs_url": "git+https://github.com/erlang/otp.git"
48 },
49 "subpath": "src/asn1ct.erl"
50 },
51 "expected_output": "pkg:otp/[email protected]?arch=amd64&platform=linux&repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git#src/asn1ct.erl",
52 "expected_failure": false,
53 "expected_failure_reason": null
54 },
55 {
56 "description": "Parse test for <class 'type'> PURL",
57 "test_group": "base",
58 "test_type": "parse",
59 "input": "pkg:otp/[email protected]",
60 "expected_output": {
61 "type": "otp",
62 "namespace": null,
63 "name": "hex",
64 "version": "2.1.1",
65 "qualifiers": null,
66 "subpath": null
67 },
68 "expected_failure": false,
69 "expected_failure_reason": null
70 },
71 {
72 "description": "Roundtrip test for <class 'type'> PURL",
73 "test_group": "base",
74 "test_type": "roundtrip",
75 "input": "pkg:otp/[email protected]",
76 "expected_output": "pkg:otp/[email protected]",
77 "expected_failure": false,
78 "expected_failure_reason": null
79 },
80 {
81 "description": "Build test for <class 'type'> PURL",
82 "test_group": "base",
83 "test_type": "build",
84 "input": {
85 "type": "otp",
86 "namespace": null,
87 "name": "hex",
88 "version": "2.1.1",
89 "qualifiers": null,
90 "subpath": null
91 },
92 "expected_output": "pkg:otp/[email protected]",
93 "expected_failure": false,
94 "expected_failure_reason": null
95 },
96 {
97 "description": "Parse test for <class 'type'> PURL",
98 "test_group": "base",
99 "test_type": "parse",
100 "input": "pkg:otp/namespace/[email protected]",
101 "expected_failure": true,
102 "expected_failure_reason": "Should fail to parse an OTP PURL containing a prohibited namespace component"
103 },
104 {
105 "description": "Build test for <class 'type'> PURL",
106 "test_group": "base",
107 "test_type": "build",
108 "input": {
109 "type": "otp",
110 "namespace": "namespace",
111 "name": "hex",
112 "version": "2.1.1",
113 "qualifiers": null,
114 "subpath": null
115 },
116 "expected_failure": true,
117 "expected_failure_reason": "Should fail to build an OTP PURL containing a prohibited namespace component"
118 }
119 ]
120 }