Files
reverse-engineering-anything/src/windows/WindowsOwnedProcess.test.ts
T
N0zoM1z0 26881da76a feat(ghidra): enable Windows x64 read-only analysis (#699)
* feat(ghidra): enable Windows x64 read-only analysis

* test(ghidra): exercise native Windows runtime boundaries

* test(ghidra): verify current Windows inventory and isolate ACL observer

* fix(ghidra): align Windows admission and address P0 review
2026-10-06 16:53:33 +08:00

21 lines
692 B
TypeScript

import { describe, expect, it } from "vitest";
import { quoteWindowsProcessArgument } from "./WindowsOwnedProcess.js";
describe("Windows process argument representation", () => {
it.each([
["", '""'],
["plain", '"plain"'],
["two words", '"two words"'],
['embedded"quote', '"embedded\\"quote"'],
["D:\\folder\\", '"D:\\folder\\\\"'],
['slash\\"quote', '"slash\\\\\\"quote"'],
])("quotes %j without changing its CRT argument", (input, expected) => {
expect(quoteWindowsProcessArgument(input)).toBe(expected);
});
it("rejects NUL before crossing the native boundary", () => {
expect(() => quoteWindowsProcessArgument("a\0b")).toThrow("NUL");
});
});