yi-editor / yi

The Haskell-Scriptable Editor
GNU General Public License v2.0
1.51k stars 203 forks source link

Testing terminal frontend. #763

Open ethercrow opened 9 years ago

ethercrow commented 9 years ago

I've just read http://www.drmaciver.com/2015/05/using-tmux-to-test-your-console-applications/ and can think of three kinds of tests that can be written in this manner.

  1. Tests for frontend display. These feed the frontend Editor values and check that resulting "screenshots" are equal to expected ones.
  2. Tests for frontend handling user input. These call tmux send-key blah and check that correct Event values come in from the frontend.
  3. Tests for the whole editor as an interactive application, keys come in, screenshots come out. Timing things here will probably be interesting too.

I don't know if travis jobs would handle tmux sessions though.

Fuuzetsu commented 9 years ago

As the linked post says, probably want a library that does this in the background and then we can use that.

I don't see any reason why we couldn't do tmux sessions on travis.