Files
fish-shell/tests/pexpects/scrollback.py
Johannes Altmanninger 5fe1cfb895 Bump initial Primary DA query timeout
Commit 7ef4e7dfe7 (Time out terminal queries after a while,
2025-09-21) though that "2 seconds ought to be enough for anyone".
But that's not true in practice: when rebooting a macOS system, it
can take longer. Let's see if 10 seconds is enough.  It should be fine
to have such a high timeout since this shouldn't happen in other cases.

Closes #12571
2026-03-26 16:31:24 +08:00

26 lines
678 B
Python

#!/usr/bin/env python3
from pexpect_helper import SpawnedProc, control
import os
env = os.environ.copy()
env["TERM"] = "not-dumb"
env["FISH_TEST_NO_RECURRENT_QUERIES"] = ""
sp = SpawnedProc(env=env, scroll_content_up_supported=True)
sendline, expect_prompt = sp.sendline, sp.expect_prompt
expect_prompt()
sendline("bind ctrl-g scrollback-push")
sp.send_primary_device_attribute()
expect_prompt()
sp.send(control("g"))
sp.send_cursor_position_report(y=10, x=5)
sp.send_primary_device_attribute()
sp.expect_str("\x1b[9S\x1b[9A")
sp.send("\r")
sp.send_cursor_position_report(y=15, x=5)
sp.send_primary_device_attribute()
sp.send(control("l"))
sp.expect_str("\x1b[14S\x1b[14A")