test(cli): place selector regressions in the discovered adapter suite

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
N0zoM1z0andgensokyo-dev authored and gensokyo-dev committed 2026-11-11 14:43:19 +08:00
1 parent 574aca127f
commit ff86e19e23
1 file changed
+1 -1
-34
View File
@@ -1,34 +0,0 @@
import { expect, it } from "vitest";
import { resolveCliAnalysisSelector } from "./analysisSelector.js";
it.each([
["0x1a", "0x1A"],
["0x100", "0x0100"],
["ram%2f:0X0001A", "ram%2F:0x1a"],
["0x20000000000001", "0x020000000000001"],
])(
"admits equivalent coordinates while preserving the named input: %s / %s",
(left, right) => {
expect(
resolveCliAnalysisSelector(left, right, "address", "xrefs", "native"),
).toBe(right);
},
);
it.each([
["ram:0x1", "RAM:0x1"],
["0x1", "ram:0x1"],
["symbol", "Symbol"],
["0x1", "0x2"],
["0xinvalid", "0XINVALID"],
])("preserves distinct or unknown identities: %s / %s", (left, right) => {
expect(() =>
resolveCliAnalysisSelector(left, right, "address", "xrefs", "native"),
).toThrow("different objects");
});
it("keeps text selectors exact even when they look like addresses", () => {
expect(() =>
resolveCliAnalysisSelector("0x1a", "0x1A", "pattern", "search_strings"),
).toThrow("different objects");
});