mirror of
https://github.com/morluto/rea
synced 2026-10-27 06:33:32 -04:00
4d4631ac94
Use exact discovered test identities, production MCP sessions and byte-exact setup backups. Add CLI signal cleanup coverage and independent Ghidra, Go and firmware verification assertions; prune redundant test configuration and preserve platform limits.
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { writeFile } from "node:fs/promises";
|
|
import { join } from "node:path";
|
|
|
|
import { build } from "plist";
|
|
import { expect } from "vitest";
|
|
|
|
import { parseEvidence } from "../../../src/domain/evidence.js";
|
|
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
|
import { cliTest } from "../../support/cli/cliFixture.js";
|
|
|
|
cliTest(
|
|
"compiled CLI inspects an XML keyed archive with a non-plist suffix",
|
|
async ({ cli }) => {
|
|
const root = await createTestTempDirectory("rea-keyed-xml-extension-cli-");
|
|
const path = join(root, "Model.archive");
|
|
await writeFile(
|
|
path,
|
|
build({
|
|
$archiver: "NSKeyedArchiver",
|
|
$version: 100000,
|
|
$objects: ["$null", "leaf"],
|
|
$top: { root: { UID: 1 } },
|
|
}),
|
|
);
|
|
const output = await cli.run({
|
|
arguments: ["inspect-keyed-archive", path, "--json"],
|
|
environment: { REA_LOG_LEVEL: "silent", REA_ANALYSIS_PROVIDER: "auto" },
|
|
});
|
|
expect(output.exitCode, output.stderr).toBe(0);
|
|
expect(parseEvidence(output.json).normalized_result).toMatchObject({
|
|
archive_path: "Model.archive",
|
|
archive_format: "xml-plist",
|
|
objects: expect.arrayContaining([
|
|
expect.objectContaining({ value: "leaf" }),
|
|
]),
|
|
});
|
|
},
|
|
);
|