test: add failing CPE formatting for colons

Signed-off-by: Weston Steimel <author@code.w.steimel.me.uk>
This commit is contained in:
Weston Steimel 2026-03-23 15:47:12 +00:00
parent 860126c650
commit 1f2a299cb5
No known key found for this signature in database
GPG Key ID: E530F3AC99ABCABF

View File

@ -219,6 +219,16 @@ func Test_RoundTrip(t *testing.T) {
Version: "3.2",
},
},
{
name: "escaped colon",
cpe: "cpe:2.3:a:test_vendor:name\\:\\:module:3.2:*:*:*:*:*:*:*",
parsedCPE: Attributes{
Part: "a",
Vendor: "test_vendor",
Product: "name::module",
Version: "3.2",
},
},
}
for _, test := range tests {