aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-25 21:19:26 +0200
committerblasty <blasty@local>2026-07-25 21:19:26 +0200
commitb79d1028b0365b02e8d7d515087482e2ee249d6a (patch)
tree6a1bcb869aba26260018e48d505735afcd17dbdd /tests
parenthighlight: bring pseudocode onto the measured palette (diff)
downloadida-tui-b79d1028b0365b02e8d7d515087482e2ee249d6a.tar.gz
ida-tui-b79d1028b0365b02e8d7d515087482e2ee249d6a.tar.xz
ida-tui-b79d1028b0365b02e8d7d515087482e2ee249d6a.zip
palette: match case-insensitively in BOTH directions
Ctrl+N found nothing on libcrypto. Typing "PEM_read_bio" returned 0 of 10093 functions while the backend resolved the very same name to 0x1d6290. _fuzzy lowercased the NAME but not the QUERY, then walked the query's characters through the lowered name. One capital letter and the subsequence walk fails at the first character, so the match is not merely worse — it is None, and the palette shows nothing at all. Invisible on the test binary because C symbols there are lowercase (main, strlen, error) and every existing palette check typed a lowercase query. Fatal on any library that capitalises: OpenSSL, most SDKs, Windows binaries. The paging index was the obvious suspect and was innocent — all_loaded() had all 10093. Verified on a live libcrypto pane: "PEM_read_bio" now returns 34 hits, exact match ranked first. tests: the palette scenario now types "MAIN" and expects "main". Confirmed it fails without the fix (results=[]) and passes with it. 193/0.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_scenarios.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py
index 091ddc8..4024c07 100644
--- a/tests/test_scenarios.py
+++ b/tests/test_scenarios.py
@@ -309,6 +309,15 @@ async def s_palette(c: Ctx):
c.check("palette matches a fuzzy subsequence",
any(n == "error" for _, _, n in pal._results),
f"results={[n for _, _, n in pal._results[:4]]}")
+ # Every other query here is lowercase, which is how a case bug hid for so
+ # long: the name was lowered but the query wasn't, so ONE capital matched
+ # nothing. Invisible on lowercase C symbols, fatal on a library that
+ # capitalises (PEM_read_bio found 0 of 10093 functions in libcrypto).
+ pinp.value = "MAIN"
+ await c.wait(lambda: any(n == "main" for _, _, n in pal._results), 10)
+ c.check("palette matching is case-insensitive in BOTH directions",
+ any(n == "main" for _, _, n in pal._results),
+ f"results={[n for _, _, n in pal._results[:4]]}")
pinp.value = "main"
await c.wait(lambda: pal._results and pal._results[0][2] == "main", 10)
want = pal._results[0][1]