These is a basic console capability test. Clone this repo
(https://gist.github.com/58553b13c477de79069e.git) and use
node cat console-test.txt
to dump the test to your screen. (On Mac & Linux
you can just use cat
.) There's also a hide-cursor.txt
and
show-cursor.txt
that should do what they say.
All of this is about me trying to figure out what actually is shared cross platform and what isn't.
What I've learned so far is:
- Windows & OSX both support cursor controls (to my surprise!)
- Windows does not support italics or underline (no surprise)
- Examining of Windows behaving around positioning
^[[1;1H
and screen clearing^[[J
, seems to imply that it treats the line the program started on as1,1
for positioning purposes and there's no way to position above your starting line. - Region scroll events are not supported on Windows.
Output on different terminals:
Interesting! I would probably throw cmder in the mix for Windows terminals - most "devs on Windows" that I know use it. If I had a Windows environment immediately available, I'd go ahead and run these tests myself. :P