GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - textshell/vtermdriver: a simple wrapper around libvterm to test rendering of terminal applications

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
.cirrus.yml
.cirrus.yml
 
 
.pep8speaks.yml
.pep8speaks.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
capture.cpp
capture.cpp
 
 
capture.h
capture.h
 
 
main.cpp
main.cpp
 
 
meson.build
meson.build
 
 
test.py
test.py
 
 

Repository files navigation

vtermdriver is a simple wrapper around libvterm to test rendering of terminal applications.

Usage

vtermdriver wraps an terminal application while allowing the calling process to use commands to introspect terminal state and interact with the tested application.

The test software uses a socket pair passed as standard in to communicate with the test driver.

The protocol consists of zero terminated ascii commands and syncronous replies. Additionally there are notifications send to the test software.

The replies and notifications are zero terminated byte strings. Notifications start with the byte '*'. Replies start with '{' and form a valid json document.

Invocation: vtermdriver --control-via-fd0 /path/to/app/to/test [arguments]...

Commands

capture:img

Sends the current screen content as json object.

capture:all

Sends the same data as capture:img plus additional terminal state

send-to-interior:

Sends bytes to the application that is tested. The bytes to send follow the ':' and are hex encoded.

reset

Reset the terminal state.

quit

Kill the interior application (if still running) and exit.

set:auto-quit

Automatically quit if the interior application exits.

Notifications

*exited:[code]

The application has exited with exit code [code].

*bell

The appliaction triggered the terminal bell.

Json Output

{
    "version": 0,
    "cursor_column": 0,
    "cursor_row": 1,
    "cursor_blink": true,
    "cursor_shape": "block",
    "height": 24,
    "width": 80,
    "cells": [
        {
            "x": 0,
            "t": "a",
            "y": 0
        },
        {
            "x": 1,
            "t": "\u3042",
            "width": 2,
            "y": 0
        },
        {
            "x": 3,
            "t": " ",
            "y": 0
        },
        {
            "x": 4,
            "t": " ",
            "y": 0
        },
        // ...
    ],
    "lines": {
	"0": { "soft_wrapped": true },
	// ...
    }
}

About

a simple wrapper around libvterm to test rendering of terminal applications

Topics

libvtermterminaltesting

Resources

Readme
MIT license
Activity

Stars

6 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.