{ "$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json", "tests": [ { "description": "Parse test for PURL type: hex", "test_group": "base", "test_type": "parse", "input": "pkg:hex/jason@1.1.2", "expected_output": { "type": "hex", "namespace": null, "name": "jason", "version": "1.1.2", "qualifiers": null, "subpath": null }, "expected_failure": false, "expected_failure_reason": null }, { "description": "Roundtrip test for PURL type: hex", "test_group": "base", "test_type": "roundtrip", "input": "pkg:hex/jason@1.1.2", "expected_output": "pkg:hex/jason@1.1.2", "expected_failure": false, "expected_failure_reason": null }, { "description": "Build test for PURL type: hex", "test_group": "base", "test_type": "build", "input": { "type": "hex", "namespace": null, "name": "jason", "version": "1.1.2", "qualifiers": null, "subpath": null }, "expected_output": "pkg:hex/jason@1.1.2", "expected_failure": false, "expected_failure_reason": null }, { "description": "Parse test for PURL type: hex", "test_group": "base", "test_type": "parse", "input": "pkg:hex/acme/foo@2.3.", "expected_output": { "type": "hex", "namespace": "acme", "name": "foo", "version": "2.3.", "qualifiers": null, "subpath": null }, "expected_failure": false, "expected_failure_reason": null }, { "description": "Roundtrip test for PURL type: hex", "test_group": "base", "test_type": "roundtrip", "input": "pkg:hex/acme/foo@2.3.", "expected_output": "pkg:hex/acme/foo@2.3.", "expected_failure": false, "expected_failure_reason": null }, { "description": "Build test for PURL type: hex", "test_group": "base", "test_type": "build", "input": { "type": "hex", "namespace": "acme", "name": "foo", "version": "2.3.", "qualifiers": null, "subpath": null }, "expected_output": "pkg:hex/acme/foo@2.3.", "expected_failure": false, "expected_failure_reason": null }, { "description": "Parse test for PURL type: hex", "test_group": "base", "test_type": "parse", "input": "pkg:hex/phoenix_html@2.13.3#priv/static/phoenix_html.js", "expected_output": { "type": "hex", "namespace": null, "name": "phoenix_html", "version": "2.13.3", "qualifiers": null, "subpath": "priv/static/phoenix_html.js" }, "expected_failure": false, "expected_failure_reason": null }, { "description": "Roundtrip test for PURL type: hex", "test_group": "base", "test_type": "roundtrip", "input": "pkg:hex/phoenix_html@2.13.3#priv/static/phoenix_html.js", "expected_output": "pkg:hex/phoenix_html@2.13.3#priv/static/phoenix_html.js", "expected_failure": false, "expected_failure_reason": null }, { "description": "Build test for PURL type: hex", "test_group": "base", "test_type": "build", "input": { "type": "hex", "namespace": null, "name": "phoenix_html", "version": "2.13.3", "qualifiers": null, "subpath": "priv/static/phoenix_html.js" }, "expected_output": "pkg:hex/phoenix_html@2.13.3#priv/static/phoenix_html.js", "expected_failure": false, "expected_failure_reason": null }, { "description": "Parse test for PURL type: hex", "test_group": "base", "test_type": "parse", "input": "pkg:hex/bar@1.2.3?repository_url=https://myrepo.example.com", "expected_output": { "type": "hex", "namespace": null, "name": "bar", "version": "1.2.3", "qualifiers": { "repository_url": "https://myrepo.example.com" }, "subpath": null }, "expected_failure": false, "expected_failure_reason": null }, { "description": "Roundtrip test for PURL type: hex", "test_group": "base", "test_type": "roundtrip", "input": "pkg:hex/bar@1.2.3?repository_url=https://myrepo.example.com", "expected_output": "pkg:hex/bar@1.2.3?repository_url=https:%2F%2Fmyrepo.example.com", "expected_failure": false, "expected_failure_reason": null }, { "description": "Build test for PURL type: hex", "test_group": "base", "test_type": "build", "input": { "type": "hex", "namespace": null, "name": "bar", "version": "1.2.3", "qualifiers": { "repository_url": "https://myrepo.example.com" }, "subpath": null }, "expected_output": "pkg:hex/bar@1.2.3?repository_url=https:%2F%2Fmyrepo.example.com", "expected_failure": false, "expected_failure_reason": null } ] }