Skip to content

Commit

Permalink
add ./ as a valid test case
Browse files Browse the repository at this point in the history
Signed-off-by: Ridwan Hoq <[email protected]>
  • Loading branch information
ridhoq authored and sschuberth committed Mar 4, 2024
1 parent a8ae119 commit 62a8a4b
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 @@ -486,6 +486,19 @@ func TestNormalize(t *testing.T) {
Subpath: "/sub/../path/",
},
wantErr: true,
}, {
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 62a8a4b

Please sign in to comment.