From 574aca127fe9946a86b59ffd8f232e5c233a305a Mon Sep 17 00:00:00 2001 From: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com> Date: Wed, 11 Nov 2026 06:33:00 +0000 Subject: [PATCH] test(cli): verify native equality and exact text through public commands Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> --- .../boundary/cli/analysisSelectorCli.test.ts | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/tests/boundary/cli/analysisSelectorCli.test.ts b/tests/boundary/cli/analysisSelectorCli.test.ts index afe35c34bd..73a83ba82e 100644 --- a/tests/boundary/cli/analysisSelectorCli.test.ts +++ b/tests/boundary/cli/analysisSelectorCli.test.ts @@ -220,3 +220,45 @@ cliTest( } }, ); + +cliTest( + "compares native address values without folding symbols, spaces or text queries", + async ({ cli }) => { + for (const [command, option] of [ + ["xrefs", "address"], + ["function", "procedure"], + ["instructions", "procedure"], + ["decompile", "procedure"], + ["inspect-native-api", "procedure"], + ]) { + for (const [left, right, code] of [ + ["0x1a", "0x001A", "target_unavailable"], + ["ram:0x1", "RAM:0x1", "invalid_request"], + ["Symbol", "symbol", "invalid_request"], + ]) { + const result = await cli.run({ + arguments: [ + command!, + "does-not-exist", + left!, + `--${option}=${right}`, + "--json", + ], + }); + expect(result.json, `${command}: ${left}/${right}`).toMatchObject({ + code, + }); + } + } + const result = await cli.run({ + arguments: [ + "search", + "does-not-exist", + "0x1a", + "--pattern=0x1A", + "--json", + ], + }); + expect(result.json).toMatchObject({ code: "invalid_request" }); + }, +);