mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
test(apple): separate catalog traversal coverage cases
This commit is contained in:
1 parent
a8758da09b
commit
7665bf0831
1 file changed
+19
-16
@@ -14,7 +14,7 @@ import {
|
||||
collectInterfaceBuilderResourceKeys,
|
||||
} from "./AppleAssetCatalogAnalysis.js";
|
||||
|
||||
describe("Apple asset catalog application workflow", () => {
|
||||
describe("Apple asset catalog traversal coverage", () => {
|
||||
it.for([false, true])(
|
||||
"retains catalog traversal coverage with invalid-byte entries: %s",
|
||||
async (invalidName, context) => {
|
||||
@@ -43,6 +43,24 @@ describe("Apple asset catalog application workflow", () => {
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
it("keeps represented symlinks distinct from catalog-target inspection", async () => {
|
||||
const bundle = await createTestTempDirectory("rea-asset-subtree-");
|
||||
await symlink("unexamined", join(bundle, "Resources"));
|
||||
const result = await analyzeAppleAssetCatalogs({
|
||||
bundlePath: bundle,
|
||||
targetSha256: "a".repeat(64),
|
||||
environment: {},
|
||||
runAssetUtil: async () => "[]",
|
||||
});
|
||||
expect(result.inventory_coverage.status).toBe("complete");
|
||||
expect(result.limitations).toContainEqual(
|
||||
expect.stringContaining("catalogs beneath them may remain uninspected"),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Apple asset catalog application workflow", () => {
|
||||
it("joins only explicit resource-key fields with archive provenance", () => {
|
||||
expect(
|
||||
collectInterfaceBuilderResourceKeys([
|
||||
@@ -93,21 +111,6 @@ describe("Apple asset catalog application workflow", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("keeps represented symlinks distinct from catalog-target inspection", async () => {
|
||||
const bundle = await createTestTempDirectory("rea-asset-subtree-");
|
||||
await symlink("unexamined", join(bundle, "Resources"));
|
||||
const result = await analyzeAppleAssetCatalogs({
|
||||
bundlePath: bundle,
|
||||
targetSha256: "a".repeat(64),
|
||||
environment: {},
|
||||
runAssetUtil: async () => "[]",
|
||||
});
|
||||
expect(result.inventory_coverage.status).toBe("complete");
|
||||
expect(result.limitations).toContainEqual(
|
||||
expect.stringContaining("catalogs beneath them may remain uninspected"),
|
||||
);
|
||||
});
|
||||
|
||||
it.each([0, 1, 5])(
|
||||
"reports an app without compiled catalogs as empty at offset %i",
|
||||
async (offset) => {
|
||||
|
||||
Reference in new issue
Block a user