mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-05 09:43:42 +08:00
c570a14c04
Make it an ordinary struct wrapping a vector, instead of a template. This is in preparation for using it more widely, for matching bindings as well as mouse CSI sequences. Also add some mouse-disabling tests.
33 lines
719 B
Python
33 lines
719 B
Python
#!/usr/bin/env python3
|
|
from pexpect_helper import SpawnedProc
|
|
import subprocess
|
|
import sys
|
|
import time
|
|
|
|
sp = SpawnedProc(args=["-d", "reader"])
|
|
sp.expect_prompt()
|
|
|
|
# Verify we correctly diable mouse tracking.
|
|
|
|
# Five char sequence.
|
|
sp.send("\x1b[tDE")
|
|
sp.expect_str("reader: Disabling mouse tracking")
|
|
|
|
# Six char sequence.
|
|
sp.send("\x1b[MABC")
|
|
sp.expect_str("reader: Disabling mouse tracking")
|
|
|
|
# Nine char sequences.
|
|
sp.send("\x1b[TABCDEF")
|
|
sp.expect_str("reader: Disabling mouse tracking")
|
|
|
|
# Extended SGR sequences.
|
|
sp.send("\x1b[<fooM")
|
|
sp.expect_str("reader: Disabling mouse tracking")
|
|
|
|
sp.send("\x1b[<foobarm")
|
|
sp.expect_str("reader: Disabling mouse tracking")
|
|
|
|
sp.sendline("echo done")
|
|
sp.expect_prompt("done")
|