aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-09 14:34:17 +0200
committerblasty <blasty@local>2026-07-09 14:34:17 +0200
commite10d5f3e83610ad1b3552ec1db1ef65f82cfa313 (patch)
tree7af98ede0086b7e8e286baceec731ec168758540 /tests
parenttrack pseudocode-view cursor position across jumps (diff)
downloadida-tui-e10d5f3e83610ad1b3552ec1db1ef65f82cfa313.tar.gz
ida-tui-e10d5f3e83610ad1b3552ec1db1ef65f82cfa313.tar.xz
ida-tui-e10d5f3e83610ad1b3552ec1db1ef65f82cfa313.zip
sortable function list: click column headers (addr/name/size)
- on_data_table_header_selected sorts the cached function list by the clicked column (address / name / size); clicking the same header reverses. Header label shows a ▲/▼ arrow. Sorting composes with the active filter. - pilot suite 41/41.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_tui.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_tui.py b/tests/test_tui.py
index bd110c1..f7cbc81 100644
--- a/tests/test_tui.py
+++ b/tests/test_tui.py
@@ -384,6 +384,27 @@ async def run(db):
dec.cursor == drow and dec.word_under_cursor() == dsym,
f"cursor={dec.cursor} (want {drow}) word={dec.word_under_cursor()!r}")
+ # Column sort: click headers to sort by name / address.
+ if app._filter_term:
+ app._apply_filter("")
+ await pilot.pause(0.1)
+ await pilot.click(table, offset=(15, 0)) # Function header
+ await pilot.pause(0.3)
+ snames = [str(table.get_row_at(i)[1]) for i in range(min(20, table.row_count))]
+ check("click Function header sorts by name",
+ app._sort_col == 1 and snames == sorted(snames, key=str.lower),
+ f"sort_col={app._sort_col}")
+ first_asc = str(table.get_row_at(0)[1])
+ await pilot.click(table, offset=(15, 0)) # reverse
+ await pilot.pause(0.3)
+ check("click again reverses the sort",
+ app._sort_reverse and str(table.get_row_at(0)[1]) != first_asc)
+ await pilot.click(table, offset=(3, 0)) # Address header
+ await pilot.pause(0.3)
+ saddrs = [int(str(table.get_row_at(i)[0]), 16) for i in range(min(20, table.row_count))]
+ check("click Address header sorts by address",
+ app._sort_col == 0 and saddrs == sorted(saddrs), f"sort_col={app._sort_col}")
+
def main(argv):
db = None