Git Product home page Git Product logo

Comments (9)

jerch avatar jerch commented on August 15, 2024

Passing vttest is a big deal. You would have to implement most of the DEC primitives the right way and the documentation of those is lousy. Best source would be http://vt100.net and the source code of popular emulators like xterm or rxvt.
I tried to set up test cases for the primitives based upon xterm output. You can find them here https://github.com/netzkolchose/node-ansiterminal/tree/master/test. The test cases are still work in progress, though you might find them useful somehow.

from upterm.

vlad-shatskyi avatar vlad-shatskyi commented on August 15, 2024

Thank you @jerch. If only there was a test suite failing with a message like CUB should not wrap at the edge of the screen. Instead, you can see that the output looks different, but have no idea why.

from upterm.

jerch avatar jerch commented on August 15, 2024

Yeah esp. the last column handling is awkward. I started to support unicode with fullwidth characters in node-ansiterminal - it is a total mess at the last column. No clue yet how to solve this in a clean way but it needs refactoring -.-

from upterm.

vlad-shatskyi avatar vlad-shatskyi commented on August 15, 2024

We could create an independent suite which would work for any terminal implementation (maybe the requirement would be to render to a 2d array of characters for the suite, but I'm not sure).

from upterm.

jerch avatar jerch commented on August 15, 2024

Hmm, separate the frontend stuff (user events and output) from the low level vt stuff - thats the reason why I splitted the whole stuff in node-ansiterminal and the jquery.browserterminal as the frontend (while the latter is still quick&dirty "can I get this run"-code).
Not sure if a separation like this will do for your needs since you have much more functionality in mind (my goal is to get a full featured classical vt emulation in the browser, which comes with some restrictions like no node types etc). But if you are cool with that we could try to build something like "libvt" for node/browser as a basic vt drop-in stack (tested of course :D).

from upterm.

vlad-shatskyi avatar vlad-shatskyi commented on August 15, 2024

I was thinking of something like https://github.com/karlcow/markdown-testsuite, which provides an independent set of tests for every MarkDown implementation in the world.

I would like the suite to be able to test xterm, iTerm 2, and others. It would give us an immediate benefit of having a reference implementation (if it works in xterm, it should work in whatever-terminal) and a delayed benefit of simplifying the lives of other people who want to create a new terminal.

from upterm.

jerch avatar jerch commented on August 15, 2024

Ah got you. Well it should be possible but would require a well crafted testsuite with adapters to other languages (as test drop-ins into xterm source etc). Biggest problem would be to get all the right definitions of all (or at first most common) modi a terminal can switch to (xterm has tons of different emulation modi).

from upterm.

vlad-shatskyi avatar vlad-shatskyi commented on August 15, 2024

Hooray, the first screen looks perfect!

from upterm.

kbrock avatar kbrock commented on August 15, 2024

vttest looks like a worthy (and ambitious goal).

The node-ansiterminal test looks like a great start. Very easy to catch regressions. Seems it may be difficult hook into the right portion of the terminal emulator though.

Looks like the xterm faq is moslty focused on the number of supported functions and visual differences of the various implementation. If you wanted to create a test suite to be used across multiple terminal emulators, probably would be best to stick to that. Maybe standardize on screen size, font, font size, and compare screen shots?

Very cool project. Thanks all

from upterm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.