aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-23 15:26:42 +0200
committerblasty <blasty@local>2026-07-23 15:26:42 +0200
commit73305a513b929838f04f53d88dea2b1483cc485f (patch)
tree089588a172346c854789436f6444dc3a2ee0f155 /tests
parentunify: back the function disasm view on the heads listing walker (M4 item 4) (diff)
downloadida-tui-73305a513b929838f04f53d88dea2b1483cc485f.tar.gz
ida-tui-73305a513b929838f04f53d88dea2b1483cc485f.tar.xz
ida-tui-73305a513b929838f04f53d88dea2b1483cc485f.zip
app: 'L' opens the continuous segment listing (functions+data interleaved)
Function views are bounded to one function; 'L' from any code view opens the whole-segment ListingView at the cursor instead -- one long flat listing where functions/data/undefined interleave and you scroll straight from one function into the next. Reuses the region listing path (_goto_continuous). New continuous_view scenario: open a function, press L, assert continuous listing opens, cursor at the origin function, listing spans past the function bounds, code interleaves with data. 22/0 with disasm_nav/view_toggle/ region_define (L is additive).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_scenarios.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py
index d3576c0..b921c54 100644
--- a/tests/test_scenarios.py
+++ b/tests/test_scenarios.py
@@ -1604,6 +1604,33 @@ async def s_listing_struct_expand(c: Ctx):
c.prog.bump_items()
+@scenario("continuous_view")
+async def s_continuous_view(c: Ctx):
+ """'L' opens one long continuous segment listing (functions + data
+ interleaved) at the cursor, instead of the function-bounded disasm."""
+ app = c.app
+ fn = await c.open_biggest("disasm")
+ func_total = c.dis.total
+ fn_ea = fn.addr
+ c.dis.focus()
+ await c.press("L")
+ await c.wait(lambda: app._active == "listing" and app._cur is not None
+ and app._cur.is_region and c.lst.total > 0, 25)
+ c.check("L opens the continuous listing",
+ app._active == "listing" and app._cur.is_region,
+ f"active={app._active} cur={app._cur}")
+ c.check("cursor lands at the origin function in the continuous view",
+ c.lst._cursor_ea() == fn_ea, f"cur_ea={c.lst._cursor_ea()}")
+ # the continuous listing spans the whole segment, not just the function
+ c.lst.model.load_all()
+ c.check("continuous listing extends past the function's bounds",
+ len(c.lst.model) > func_total,
+ f"listing={len(c.lst.model)} func={func_total}")
+ kinds = {c.lst.model.get(i).kind for i in range(len(c.lst.model))}
+ c.check("continuous listing interleaves code with data/undefined",
+ "code" in kinds and ("data" in kinds or "unknown" in kinds), str(kinds))
+
+
# --------------------------------------------------------------------------- #
# Runner
# --------------------------------------------------------------------------- #