mirror of
https://github.com/python/cpython.git
synced 2026-05-31 23:00:47 +00:00
gh-143394: filter for turning off automatic margins in test_no_newline (GH-143433)
This commit is contained in:
parent
7a572d9f21
commit
04ace41fe2
1 changed files with 11 additions and 0 deletions
|
|
@ -1991,6 +1991,17 @@ def test_no_newline(self):
|
|||
safe_patterns.append(r'\x1b\[\?25[hl]') # cursor visibility
|
||||
safe_patterns.append(r'\x1b\[\?12[hl]') # cursor blinking
|
||||
|
||||
# rmam / smam - automatic margins
|
||||
rmam = ti.get("rmam")
|
||||
smam = ti.get("smam")
|
||||
if rmam:
|
||||
safe_patterns.append(re.escape(rmam.decode("ascii")))
|
||||
if smam:
|
||||
safe_patterns.append(re.escape(smam.decode("ascii")))
|
||||
if not rmam and not smam:
|
||||
safe_patterns.append(r'\x1b\[\?7l') # turn off automatic margins
|
||||
safe_patterns.append(r'\x1b\[\?7h') # turn on automatic margins
|
||||
|
||||
# Modern extensions not in standard terminfo - always use patterns
|
||||
safe_patterns.append(r'\x1b\[\?2004[hl]') # bracketed paste mode
|
||||
safe_patterns.append(r'\x1b\[\?12[hl]') # cursor blinking (may be separate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue