fix(dotnet): preserve leading Unicode content in metadata strings (#667)
Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
This commit is contained in:
@@ -139,3 +139,19 @@ describe("managed artifact inventory", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves U+FEFF in references and fixed attribute strings", () => {
|
||||
const bytes = buildManagedPeFixture({
|
||||
references: ["\uFEFFSystem.Runtime", "System.\uFEFFRuntime"],
|
||||
targetFramework: "\uFEFF.NETCoreApp,Version=v8.0",
|
||||
});
|
||||
const result = inspectManagedArtifactBytes(
|
||||
bytes,
|
||||
managedPeFixtureTarget(bytes),
|
||||
);
|
||||
expect(result.references.map((reference) => reference.name)).toEqual([
|
||||
"\uFEFFSystem.Runtime",
|
||||
"System.\uFEFFRuntime",
|
||||
]);
|
||||
expect(result.target_frameworks).toEqual(["\uFEFF.NETCoreApp,Version=v8.0"]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user