diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -495,6 +495,15 @@ def run_file(binary): assert b'paged-commit-subject' in client.read(f'/pane/{pager[0]}/body') assert b'\x1b' not in client.read(f'/pane/{pager[0]}/body') client.remove(f'/pane/{pager[0]}') + # systemd's tools page through their own variable: set too, its + # secure mode off, the path unquoted where it needs none. + systemd_pager = run(client, term, b'printenv SYSTEMD_PAGER SYSTEMD_PAGERSECURE\n') + assert systemd_pager.startswith(b'exit 0\n') and systemd_pager.rstrip().endswith(b' -\n0'), systemd_pager + if shutil.which('journalctl'): + assert run(client, term, b'journalctl -n 3 --no-hostname\n').startswith(b'exit ') + for row in client.read('/index').splitlines(): + if row.split()[3:4] == [f'{root}/+Pager'.encode()]: + client.remove(f'/pane/{row.split()[0].decode()}') # A pty is not given one row (it loses the prompt's input mark, # and the shell would read busy for ever): refused, and said. try: |
