Debian Codegraph @

t/purl/types/gem-test.json

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