fix(ida): compare admitted document paths consistently
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { readFile, readdir, rm } from "node:fs/promises";
|
||||
import { sep } from "node:path";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { z } from "zod";
|
||||
import {
|
||||
@@ -111,6 +112,24 @@ describe("headless IDA producer pagination", () => {
|
||||
});
|
||||
|
||||
describe("attached IDA observation semantics", () => {
|
||||
it("accepts a normalized spelling of the bound document path", async () => {
|
||||
const { target, producer, client } = await fixture();
|
||||
const equivalent =
|
||||
process.platform === "win32"
|
||||
? target.path.toLowerCase().replaceAll("\\", "/")
|
||||
: target.path.split(sep).join(`${sep}.${sep}`);
|
||||
|
||||
const result = await client.execute("list_procedures", {
|
||||
document: equivalent,
|
||||
});
|
||||
|
||||
expect(result.ok).toBe(true);
|
||||
expect(producer.calls.some(({ name }) => name === "list_functions")).toBe(
|
||||
true,
|
||||
);
|
||||
await client.close();
|
||||
});
|
||||
|
||||
it("rejects an unrelated document before connecting or opening a provider", async () => {
|
||||
const { producer, client } = await fixture();
|
||||
const result = await client.execute("list_procedures", {
|
||||
|
||||
Reference in New Issue
Block a user