aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_project_ui.py
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-25 15:55:36 +0200
committerblasty <blasty@local>2026-07-25 15:55:36 +0200
commit26272d060d061bbc782959b4b764121b1ea9c779 (patch)
tree1384dd518dd0ae7388043e5cc343cf9fb3da6d58 /tests/test_project_ui.py
parentprojects: open the Ctrl+O switcher on the binary you're already in (diff)
downloadida-tui-26272d060d061bbc782959b4b764121b1ea9c779.tar.gz
ida-tui-26272d060d061bbc782959b4b764121b1ea9c779.tar.xz
ida-tui-26272d060d061bbc782959b4b764121b1ea9c779.zip
strings: F2 widens the strings browser to the whole project
Completes phase 2 — the index already carried strings (KIND_STRING), the palette just didn't offer the toggle. StringsPalette now mirrors SymbolPalette: F2 flips between this binary and the project, project rows are prefixed with their binary, and choosing a literal in another binary switches to it and jumps. Ranking matches the symbol side: the trigram index guarantees the match, so ordering is earliest-match then shortest, with a (binary, addr) tiebreak — the same tie that crashed symbol search when two binaries shared a name, avoided here by construction. Project scope caps at 60 like symbols. _results is now (binary, addr, text) tuples in both palettes, so _on_string_chosen takes the same (binary, addr) choice and routes through _switch_then_goto. test_project_ui.py: local scope stays single-binary, F2 spans >=2 binaries (23 checks). Suite 191/0.
Diffstat (limited to 'tests/test_project_ui.py')
-rw-r--r--tests/test_project_ui.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_project_ui.py b/tests/test_project_ui.py
index e3bfb62..731811d 100644
--- a/tests/test_project_ui.py
+++ b/tests/test_project_ui.py
@@ -168,6 +168,24 @@ async def run(bins):
await pilot.press("escape")
await pilot.pause(0.2)
+ # -- and the same toggle for strings --------------------------- #
+ from idatui.app import StringsPalette
+ await pilot.press("quotation_mark")
+ if await settle(lambda: isinstance(app.screen, StringsPalette), 30):
+ pal = app.screen
+ pal.query_one(Input).value = "usage"
+ await pilot.pause(0.3)
+ local = {b for b, _, _ in pal._results}
+ await pilot.press("f2")
+ await pilot.pause(0.4)
+ wide = {b for b, _, _ in pal._results}
+ check("strings: local scope is this binary only", local == {None},
+ f"{local}")
+ check("strings: F2 widens across the project",
+ len(wide) >= 2 and None not in wide, f"{wide}")
+ await pilot.press("escape")
+ await pilot.pause(0.2)
+
# -- the promise: nothing was written next to the sources ---------- #
left = sorted(os.listdir(src))
check("the source tree stays pristine (no .i64/scratch beside it)",