Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property testing against other vt100 implementations #122

Open
Widdershin opened this issue Sep 7, 2017 · 1 comment
Open

Property testing against other vt100 implementations #122

Widdershin opened this issue Sep 7, 2017 · 1 comment

Comments

@Widdershin
Copy link

Hey, here's an idea:

There is a form of testing called property testing or generative testing, originally popularized by the quickcheck library in Haskell. The idea is to identify properties of a piece of code, and create generators that provide arbitrary inputs, so that test cases can be generated.

If there are other vt100 implementations that are considered to be gold standard, we could write a property test for terminal.js to encode the property that given the same inputs, the terminal text representation should be equivalent to the program used as a reference implementation.

I'm interested in exploring this option, but I'm unsure which vt100 implementations are considered gold standard. They don't even need to be written in JavaScript, we could use a subprocess in node to communicate with them.

@Gottox what problems do you test terminal.js against to compare behaviour?

@Widdershin Widdershin changed the title Property testing against other programs Property testing against other vt100 implementations Sep 7, 2017
@Gottox
Copy link
Owner

Gottox commented Sep 12, 2017

The golden Standard is imho xterm. It supports most escape sequences, including stuff that I never saw in real world usage (double width/height for example). But I guess it's hard to get information out of the terminal.

Another option would be vte, I'm not sure what's exposed to the api, but it should be possible to test against this implementation.

If you like to add such test scenarios to terminal.js feel free, it could be a helpful tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants