At the moment we only have snapshots for pure logic of rendering and event handling.
While it's useful on its own, it doesn't test the mountain of terminal weirdness that real users can see.
To get closer to that, we have the following options:
expect command on Linux/MacOS, and record the session into a log file
- Using
openpty: https://www.man7.org/linux/man-pages/man3/openpty.3.html
- Using pty4j: https://github.com/JetBrains/pty4j
My preference is (2) – even though it will require quite a lot of bindings and nasty code, but it will allow us to easily send SIGWINCH signals to the process and emulate terminal resizing.
Note that these tests don't have to run natively or for all platforms – they can be purely JVM/Native tests that use a native binary built for the platform.
The main point is that we launch a native binary/jar/native image using a pty.
At the moment we only have snapshots for pure logic of rendering and event handling.
While it's useful on its own, it doesn't test the mountain of terminal weirdness that real users can see.
To get closer to that, we have the following options:
expectcommand on Linux/MacOS, and record the session into a log fileopenpty: https://www.man7.org/linux/man-pages/man3/openpty.3.htmlMy preference is (2) – even though it will require quite a lot of bindings and nasty code, but it will allow us to easily send SIGWINCH signals to the process and emulate terminal resizing.
Note that these tests don't have to run natively or for all platforms – they can be purely JVM/Native tests that use a native binary built for the platform.
The main point is that we launch a native binary/jar/native image using a pty.