Skip to content

Setup Pty testing #57

Description

@keynmol

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:

  1. expect command on Linux/MacOS, and record the session into a log file
  2. Using openpty: https://www.man7.org/linux/man-pages/man3/openpty.3.html
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions