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" |
|
}, |
There are a couple of
pkg:swifttest cases that seem excessively strict, since they require an implementation that follows the how-to-parse procedure to reject the purlpkg:swift/github.com/Alamofire/@5.4.3.An implementation that follows the aforementioned parse procedure would strip the slash before the
@separator as specified inpurl-spec/docs/how-to-parse.md
Lines 59 to 60 in 5d9516c
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:
purl-spec/tests/types/swift-test.json
Lines 88 to 105 in 5d9516c