Files
rea/src/domain/dosCom.test.ts
T
N0zoM1z0andGitHub 5bcb6645b5 feat(ghidra): admit explicit DOS COM analysis (#702)
* feat(ghidra): admit explicit DOS COM analysis

Carry caller-selected COM interpretation through CLI, MCP and target
identity, seed real-mode entry/context before Ghidra analysis, and verify
complete loaded bytes, source mappings and measured register context.
Keep original binaries unchanged and PSP/runtime coverage explicit.

Assisted-by: Nitori (gensokyo-skills:nitori-reverse-engineering)

* fix(verification): validate COM package selection before allocating fixtures
2026-10-06 16:26:40 +08:00

19 lines
714 B
TypeScript

import { describe, expect, it } from "vitest";
import { executableFormatHintSchema, validateDosComLength } from "./dosCom.js";
describe("explicit DOS COM interpretation", () => {
it.each([1, 0xff00])("admits the segment extent %i", (length) => {
expect(validateDosComLength(length).ok).toBe(true);
});
it.each([0, -1, 0xff01, 1.5, NaN, Infinity])(
"rejects invalid extent %i",
(length) => {
expect(validateDosComLength(length).ok).toBe(false);
},
);
it("does not turn arbitrary format names into raw COM", () => {
expect(executableFormatHintSchema.safeParse("dos-com").success).toBe(true);
expect(executableFormatHintSchema.safeParse("raw").success).toBe(false);
});
});