Skip to content

Commit

Permalink
- Corrected test cases for the dotnet executable cataloger.
Browse files Browse the repository at this point in the history
Signed-off-by: HeyeOpenSource <[email protected]>
  • Loading branch information
HeyeOpenSource committed Oct 24, 2024
1 parent a92a4da commit ae360d2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions syft/pkg/cataloger/dotnet/parse_dotnet_portable_executable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,32 @@ func TestParseDotnetPortableExecutable(t *testing.T) {
},
{
name: "dotnet package with malformed field and extended version",
versionResources: map[string]string{
"CompanyName": "Microsoft Corporation",
"FileDescription": "äbFile\xa0\xa1Versi on",
"FileVersion": "4.6.25512.01 built by: dlab-DDVSOWINAGE016. Commit Hash: d0d5c7b49271cadb6d97de26d8e623e98abdc8db",
"InternalName": "äbFileVersion",
"LegalCopyright": "© Microsoft Corporation. All rights reserved.",
"OriginalFilename": "TProductName",
"ProductName": "Microsoft® .NET Framework",
"ProductVersion": "4.6.25512.01 built by: dlab-DDVSOWINAGE016. Commit Hash: d0d5c7b49271cadb6d97de26d8e623e98abdc8db",
},
expectedPackage: pkg.Package{
Name: "äbFileVersi on",
Version: "4.6.25512.01",
FoundBy: dotnetPortableExecutableCatalogerName,
PURL: "pkg:nuget/%C3%A4bFileVersi%[email protected]",
Metadata: pkg.DotnetPortableExecutableEntry{
LegalCopyright: "© Microsoft Corporation. All rights reserved.",
InternalName: "äbFileVersion",
CompanyName: "Microsoft Corporation",
ProductName: "Microsoft® .NET Framework",
ProductVersion: "4.6.25512.01 built by: dlab-DDVSOWINAGE016. Commit Hash: d0d5c7b49271cadb6d97de26d8e623e98abdc8db",
},
},
},
{
name: "dotnet package with malformed field and extended version #02",
versionResources: map[string]string{
"CompanyName": "Microsoft Corporation",
"FileDescription": "äb\x01File\xa0\xa1Versi on",
Expand Down

0 comments on commit ae360d2

Please sign in to comment.