test(erlang): reject an empty BEAM path at the CLI

NUL paths cannot be passed through process spawn, so the shared NUL rule
stays covered by the public schema and service tests.

Co-authored-by: morluto <morluto@users.noreply.github.com>
This commit is contained in:
Cursor Agentandmorluto committed 2026-10-22 05:59:25 +00:00
1 parent 35c6e25fa6
commit 60bb5d92e2
1 file changed
+7 -9
+7 -9
View File
@@ -42,16 +42,14 @@ cliTest(
},
);
cliTest("rejects empty and NUL BEAM paths before reading", async ({ cli }) => {
cliTest("rejects an empty BEAM path before reading", async ({ cli }) => {
const root = await createTestTempDirectory("rea-beam-cli-path-");
for (const path of ["", "app\0.beam"]) {
const result = await cli.run({
arguments: ["inspect-erlang-beam", path, "--json"],
cwd: root,
});
expect(result.exitCode, result.stderr).not.toBe(0);
expect(result.stdout).not.toContain("sha256");
}
const result = await cli.run({
arguments: ["inspect-erlang-beam", "", "--json"],
cwd: root,
});
expect(result.exitCode, result.stderr).not.toBe(0);
expect(result.stdout).not.toContain("sha256");
});
cliTest("reports a truncated BEAM as invalid input", async ({ cli }) => {