Option to override cols/rows of the recorded process

This adds `--cols <n>` / `--rows <n>` options to `rec` command. This disables
autodection of terminal size, and reports fake fixed number of columns/rows to
the recorded process.
This commit is contained in:
Marcin Kulik
2022-02-16 23:01:15 +01:00
parent 41d2476c11
commit fd09df89f6
8 changed files with 83 additions and 29 deletions

View File

@@ -44,6 +44,6 @@ class TestRecord(Test):
"; sys.stdout.write('bar')"
),
]
asciinema.pty_.record(command, output)
asciinema.pty_.record(command, output, lambda: (80, 24))
assert output.data == [b"foo", b"bar"]