Skip to content

Excessively strict swift testcases #825

@petergardfjall

Description

@petergardfjall

There are a couple of pkg:swift test cases that seem excessively strict, since they require an implementation that follows the how-to-parse procedure to reject the purl pkg:swift/github.com/Alamofire/@5.4.3.

An implementation that follows the aforementioned parse procedure would strip the slash before the @ separator as specified in

- Strip all trailing '/' characters (e.g., '/', '//', '///' and
so on) from the **remainder**

to end up with namespace: github.com, name: Alamofire.

So either the procedure is wrong or the testcase is overly strict.

The two testcases in question are:

{
"description": "invalid swift purl without name",
"test_group": "base",
"test_type": "parse",
"input": "pkg:swift/github.com/Alamofire/@5.4.3",
"expected_output": null,
"expected_failure": true,
"expected_failure_reason": "Should fail to parse a PURL from invalid purl input"
},
{
"description": "invalid swift purl without name",
"test_group": "base",
"test_type": "parse",
"input": "pkg:swift/github.com/Alamofire/@5.4.3",
"expected_output": null,
"expected_failure": true,
"expected_failure_reason": "Should fail to parse a PURL from invalid canonical purl input"
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    Test suitetype: swiftUpdates for the registered 'swift' PURL type

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions