Skip to content

Commit

Permalink
add ../ as a valid prefix test
Browse files Browse the repository at this point in the history
Signed-off-by: Ridwan Hoq <ridwanhoq@microsoft.com>
  • Loading branch information
ridhoq authored and sschuberth committed Mar 4, 2024
1 parent 62a8a4b commit 322020f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packageurl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,19 @@ func TestNormalize(t *testing.T) {
Qualifiers: packageurl.Qualifiers{},
Subpath: "./sub/path",
},
}, {
name: "'../' is a valid subpath prefix",
input: packageurl.PackageURL{
Type: "npm",
Name: "pkg",
Subpath: "../sub/path",
},
want: packageurl.PackageURL{
Type: "npm",
Name: "pkg",
Qualifiers: packageurl.Qualifiers{},
Subpath: "../sub/path",
},
}, {
name: "known type namespace adjustments",
input: packageurl.PackageURL{
Expand Down

0 comments on commit 322020f

Please sign in to comment.