Improve/update esctest scripts
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.1.5
- OS version: 10.13.4
- Attach ~/Library/Preferences/com.googlecode.iterm2.plist here com.googlecode.iterm2.plist
current (using git hash 172fe7574339c17be9ac8538786fa2c8939fb342)
Here's a quick review of esctest, with corrections to the script. First, the attachments:
Then the explanation/discussion:
The configuration details for xterm are a little vague. I normally do development configuration for xterm using "cfg-xterm" (which in turn calls "cfg-normal" to turn on --enable-warnings, --disable-echo in the configure script). Using that as a reference, I added two scripts to construct xterm in the configurations expected by esctest (cfg-esctest, cfg-esctest-wide). For testing, I'm running the corresponding run-esctest or run-esctest-wide in the directory where I've configured xterm for building. Those run xterm with the options expected by esctest, giving a shell where I run it again, to do the test. (The outer instance of "run-esctest*" accepts a parameter for the decTerminalId resource, 1-5).
There are a lot of valid configurations for xterm; at the moment I'm ignoring esctest's behavior with 8-bit characters (which has some problems...) and more than 16 colors (also needs attention in esctest). To work around its problems with 8-bit characters, I set POSIX locale on the "run-esctest" using another script "with-locale".
Except for the window-ops, the changes should be easy to follow:
- some tests would fail because the vt-level wasn't marked (anything requiring DECRQCRA is level 4 or up)
- some tests would fail because they were marked as a known bug
I modified the decoration for all of the tests which showed up in these scripts (there may be a few incorrect).
In the window-ops area, I've modified several to use new control sequences for xterm which will appear in patch #322 (closed), to eliminate "20" or "21" as a character size, using generally "3" as an acceptable error for the number of cells. Those tests give me repeatable results, except for 3 of the maximize cases which depend heavily on the environment (window manager, etc).
Given that as background, it should be possible to adapt those scripts to your environment to compare results (and perhaps improve the discussion in esctest's readme's about the test-conditions).
Finally of course there's the patch with suggested corrections. I've made several small fixes in xterm toward #332 (closed) (including adding a couple of controls to help with the winops tests). I'll probably finish that this weekend (code's done, but I've been adding to the documentation).