nixos/tests: add integration tests for terminal emulators #103733
Motivation for this change
The terminal emulator is a pretty key program for a lot of (most?) desktop users, so it seems nice to have some certainty that they work before updating your system.
Terminal emulators all present a pretty similar interface, which gives us an opportunity to easily test their basic functionality with a single codebase.
My goal here was consistency -- I believe these tests should strike a good balance of thoroughness and simplicity, by not doing text input to the terminals, thereby avoiding much possibility of race conditions or focus issues.
There are two tests run on each terminal emulator
The latter is used as a proxy for "can it display text?", without going through all the intricacies of OCR.
256-colour terminal mode is used to display the test colour, since it has a universally-applicable palette (unlike 8- and 16- colour, where the colours are implementation-defined), and it is widely supported (unlike 24-bit colour).
I definitely don't have coverage of every terminal emulator -- I will address these in future PRs