Skip to content

Commit cbf6b88

Browse files
ThomasDickeygnachman
authored andcommitted
This is a squash of Thomas Dickey's commits in PR 1.
originally 2018-04-04 * tests/da.py: works for me (I fixed that in January 2015 from report by Nachman) * tests/decrqss.py, tests/decera.py, tests/decsera.py, tests/decic.py, tests/decdc.py, tests/xterm_winops.py: works for me originally 2018-04-05 * tests/decset.py: works for me * tests/decscl.py: works for me (DECSCL except for the "expected" RIS) * tests/deccra.py: works for me - but his expected value was wrong originally 2018-04-06 * tests/decset.py, tests/rep.py: fixed:332 originally 2018-04-08 * tests/xterm_winops.py: try to restore screen between maximizing (would need a composite test too) * esccmd.py: another code * tests/xterm_winops.py: try adding timing fixes (doesn't seem to help, but doesn't hurt) * tests/xterm_winops.py: hmm - no progress, but I see that some "Passes" are due to starting from a maximized state. * tests/xterm_winops.py: still 3 (problem with iconify/deiconfy?) * tests/xterm_winops.py: 3... * tests/xterm_winops.py: 4... * tests/xterm_winops.py: 5... * tests/xterm_winops.py: 6... * tests/xterm_winops.py: partial repair for fvwm - down to 7 failures (no change for XQuartz) * escutil.py: add functions for new xterm controls * esccmd.py: add codes for new xterm controls * tests/xterm_winops.py: partly improved: I found that XQuartz is ignoring the maximize horz/vert calls though it honors fullscreen. When switching to fvwm session, I get a bunch of regressions due to confusing pixels and chars. Check this in, to focus on those... * tests/xterm_winops.py: another bogus test * tests/xterm_winops.py: 2 bogus tests fixed. * tests/xterm_winops.py: explain * tests/xterm_winops.py: fixed test * tests/ris.py: fix * tests/decset.py: corrected test * tests/save_restore_cursor.py: xterm #328 has fix for wraptest - originally 2018-04-09 * tests/decdc.py: perhaps he needs a better test... * tests/decfi.py, tests/decbi.py: clarified * tests/cht.py: test was wrong - fix * tests/bs.py: align with xterm #332 * tests/dl.py: fixed * esc.py: add BEL, so I can send it in a test to pinpoint trace * tests/xterm_winops.py: comment-out - some fail, will revisit * tests/sd.py: works now :-) * tests/ich.py: works for me originally 2018-04-10 * tests/decrqm.py, esccmd.py: drop DECVSSM * escutil.py: *** empty log message *** * tests/decdsr.py: levels * escutil.py: fix his typo * tests/decscl.py, tests/decrqss.py: levels * esccmd.py: DECRQSS not found in vt320 manual (which is PDF only - no searching) * tests/decrqm.py, tests/vt.py, tests/vpr.py, tests/vpa.py, tests/su.py, tests/sos.py, tests/sm.py, tests/ris.py, esccmd.py, tests/s8c1t.py, tests/sd.py, tests/rm.py, tests/ri.py, tests/rep.py, tests/pm.py, tests/nel.py, tests/lf.py, tests/ind.py, tests/il.py, tests/ich.py, tests/hvp.py, tests/hpr.py, tests/hpa.py, tests/el.py, tests/ff.py, tests/ed.py, tests/ech.py, tests/dl.py, tests/decstbm.py, tests/decstr.py: levels * tests/decset.py, tests/decsera.py: levelsdecsel.py * tests/decsel.py, tests/decsed.py, tests/decscl.py, tests/decaln.py, tests/dcs.py, tests/apc.py, tests/dch.py, tests/cup.py, tests/cuf.py: levels * tests/cub.py, tests/cr.py, tests/cpl.py, tests/cnl.py, tests/cbt.py, tests/cht.py, tests/cha.py, tests/bs.py: level * tests/save_restore_cursor.py: check levels * tests/decrqm.py: filter out some of the "known bug" DECRQM * escutil.py, esccmd.py: better * escutil.py: better. * escutil.py: can't do DECRQCRA in a vt100... * tests/da.py, tests/decrqss.py: trim * tests/decrqss.py: better * tests/da.py: first cut/workable DA response originally 2018-04-11 * tests/deccra.py, tests/decdc.py, tests/decera.py, tests/decic.py, tests/decscl.py, tests/decset.py, tests/rep.py: not-xterm * tests/xterm_winops.py: python functions need parenthese - George pointed that out, and pylint too * tests/da2.py: match xterm's default behavior originally 2018-04-12 * escio.py, tests/dl.py, tests/hpa.py, tests/hvp.py, tests/ich.py, tests/sd.py, tests/ff.py, tests/ech.py, tests/ed.py, tests/el.py, tests/lf.py, tests/reset_color.py, tests/reset_special_color.py, tests/tbc.py, tests/vpa.py, tests/vpr.py, tests/decset.py, tests/decstbm.py, tests/decstr.py, tests/decscl.py, tests/decsed.py, tests/decsel.py, tests/decdsr.py, tests/decera.py, tests/decfi.py, tests/decfra.py, tests/decic.py, tests/decid.py, tests/decrqm.py, tests/decrqss.py, tests/il.py, tests/ris.py, tests/rm.py, tests/s8c1t.py, tests/sm_title.py, tests/vt.py, tests/xterm_winops.py, tests/rep.py, tests/su.py, tests/decbi.py, tests/deccra.py, tests/decdc.py, tests/dcs.py, tests/decaln.py, tests/dch.py, tests/cub.py, tests/cuf.py, tests/cup.py, tests/da2.py, tests/cr.py, tests/cha.py, tests/change_special_color.py, tests/change_dynamic_color.py, tests/change_color.py, tests/cbt.py, tests/bs.py, tests/ansirc.py, escutil.py, esclog.py, esc.py: pylint-fixes originally 2018-04-14 * tests/save_restore_cursor.py: tidy * tests/decbi.py: use double-quotes for docstring * tests/decfi.py, tests/decdc.py: docstring * tests/decbi.py: comments vs docstring * tests/decset.py: remove obsolete comment * tests/xterm_winops.py: remove redundant reset * tests/ris.py, tests/decset.py, tests/rep.py, tests/sd.py: remove comment vs xterm * tests/decset.py: no blank before docstring * tests/decdsr.py: fix a symbol conflict originally 2018-04-15 * tests/xterm_winops.py: Nachman's objecting to use of char-sizes when he asked for pixels. Start refactoring by using an if-statement to restore his original version (except for a couple of cases where the naming wasn't consistent, including one where the name was incorrect - seen with pylint). originally 2018-04-17 * tests/cht.py: document test_CHT_IgnoresScrollingRegion * tests/bs.py: explain reverse-wrap versus margins * tests/xterm_winops.py: fix per Nachman comment: - Move the call to unmaximize before the assertion to improve the odds of it happening in: * test_XtermWinops_MaximizeWindow_Horizontally * test_XtermWinops_MaximizeWindow_Vertically * escutil.py: change commented-out LogInfo to a LogDebug * tests/xterm_winops.py: fix per Nachman comment: - In test_XtermWinops_MaximizeWindow_HorizontallyAndVertically, move esccmd.XTERM_WINOPS(esccmd.WINOP_MAXIMIZE, esccmd.WINOP_MAXIMIZE_EXIT) to before the assertions. If they fail the window will be stuck maximized. originally 2018-04-18 * tests/xterm_winops.py: factor out average_width() and average_height(), fix whitespace per pylint * tests/xterm_winops.py: use absolute difference in some assert's for consistency, per Nachman comment * tests/sd.py: cite relevant standard for module docstring, fix whitespace per pylint * tests/save_restore_cursor.py: add docstring to test_SaveRestoreCursor_AltVsMain and test_SaveRestoreCursor_Wrap, and fix whitespace per pylint * tests/ris.py: add docstring to test_RIS_ResetDECCOLM, fix whitespace per pylint * tests/rep.py, tests/decfi.py, tests/decdc.py: cite relevant standard for module docstring, fix whitespace per pylint * tests/decdc.py: quote the relevant standard for test_DECDC_IsNoOpWhenCursorBeginsOutsideScrollRegion * tests/decbi.py: cite relevant standard for test_DECBI_LeftOfMargin and test_DECBI_WholeScreenScrolls originally 2018-04-20 * tests/xterm_winops.py: the remaining failed-test was due to inconsistent max_error value. * tests/xterm_winops.py: add/use delayAfterMove, delayAfterIcon, delayAfterResize, making all but the 2-way maximize work consistently with icewm originally 2018-04-21 * tests/xterm_winops.py: use checkActualPixelSize() for the remaining xterm-resizing tests involving resizing by pixels * tests/xterm_winops.py: refactor test_XtermWinops_ResizePixels_BothParameters() using new function checkActualPixelSize() * escutil.py: add GetFrameSizePixels() * escutil.py: cache the char/screen sizes, fix whitespace per pylint originally 2018-04-22 * tests/xterm_winops.py: factor out check_for_shrinkage() * tests/xterm_winops.py: factor out check_any_size * tests/xterm_winops.py: factor out check_actual_size_chars() * tests/xterm_winops.py: reduce delays, corrected a label on informational log originally 2018-04-23 * tests/xterm_winops.py: tighten pixel error-limit to 1 cell; seems to work with quartz-wm * escutil.py: add/use can_query_shell_size(), which will allow tightening the error-limits for xterm's window operations * escutil.py, tests/xterm_winops.py: change level of new debug-log calls * tests/xterm_winops.py: reducing delay after iconify caused a test-failure - undo that one. * tests/decdsr.py, tests/deccra.py, tests/decbi.py, tests/decaln.py, tests/dch.py, tests/da.py, tests/cup.py, tests/cr.py, tests/cha.py, tests/change_special_color.py, tests/apc.py, esctypes.py, esctest.py, escio.py, esccmd.py, escargs.py: fix whitespace per pylint originally 2018-04-24 * tests/sm_title.py, tests/__init__.py, tests/ed.py, tests/deccra.py, tests/vpr.py, tests/vt.py, tests/su.py, tests/sos.py, tests/nel.py, tests/pm.py, tests/ri.py, tests/rm.py, tests/s8c1t.py, tests/sm.py, tests/il.py, tests/ind.py, tests/lf.py, tests/fill_rectangle.py, tests/hpr.py, tests/hvp.py, tests/ich.py, tests/ff.py, tests/el.py, tests/ech.py, tests/dl.py, tests/decstr.py, tests/decstbm.py, tests/decset.py, tests/decsera.py, tests/decic.py, tests/decsel.py, tests/decsed.py, tests/decscl.py, tests/decrqm.py: fix whitespace per pylint * tests/xterm_winops.py: add documentation for the utility functions used for xterm-tests * README.txt: the section on xterm configuration options was incomplete. Adapted from cfg-esctest/cfg-esctest-wide scripts. * README.txt: cite DEC standards documentation, which is used in xterm versus the programmer reference manuals which give insight into differences between terminal models but are not authoritative. Also mention an old bug-fix. originally 2018-04-25 * tests/xterm_winops.py, escutil.py: stylistic change per Nachman * tests/ris.py: trim comment for iTerm2 vs ALTBUF, overlooked change in master by Nachman * tests/decset.py: remove an overlooked/obsolete comment for test_DECSET_DECLRMM() * escutil.py: if the terminal is not xterm, GetScreenSizePixels() will just return a fixed size, suggested by Nachman * escutil.py: stylistic change per Nachman George's modifications prior to commit: * Update README to conform to formatting style. * Remove --disable-xterm-checksum-bug since xterm has been fixed
1 parent 45b19a1 commit cbf6b88

81 files changed

Lines changed: 2150 additions & 1378 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.txt

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,19 @@ opinion."
99
The tested set of control sequences are documented somewhat tersely at this URL:
1010
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
1111

12-
The official documentation for DEC-supported escape sequences is here:
13-
http://www.vt100.net/docs/vt510-rm/.
12+
In its references section, the xterm control sequences summary lists several
13+
more extensive documents, with which developers are expected to be familiar.
14+
15+
Among those are manuals for VT100 through VT420 and VT510, for example:
16+
http://www.vt100.net/docs/vt510-rm/
17+
18+
DEC's standard for video terminals is here:
19+
http://www.bitsavers.org/pdf/dec/standards/EL-SM070-00_DEC_STD_070_Video_Systems_Reference_Manual_Dec91.pdf
20+
21+
Some of the later programmer reference manuals do not agree with the standard in
22+
what appears to be an editorial blunder, as noted in the xterm control sequences
23+
document. In cases where programmer manuals differ from with the video standards
24+
document, the latter is used.
1425

1526
All tests are automatic; no user interaction is required. As a consequence, some
1627
control sequences cannot be tested. For example, it is impossible to examine the
@@ -20,9 +31,29 @@ cursor position; these form the bulk of the tests.
2031

2132
Notes on xterm
2233
--------------
23-
You should build xterm yourself and configure it with --enable-dec-locator. Some
24-
tests will fail unless it is provided. Most other configuration settings are not
25-
tested and may or may not cause problems.
34+
These tests are sensitive to whether xterm was compiled with Unicode support and
35+
if it supports more than 16 colors. As of xterm patch 332, there are two sets of
36+
configuration options:
37+
38+
Use these options when testing without Unicode:
39+
40+
--enable-dec-locator
41+
--disable-256-color
42+
--disable-direct-color
43+
--disable-88-color
44+
--disable-luit
45+
--disable-wide-chars
46+
--disable-mini-luit
47+
48+
Use these options when testing with Unicode:
49+
50+
--enable-dec-locator
51+
--disable-256-color
52+
--disable-direct-color
53+
--disable-88-color
54+
55+
Most other configuration settings are not tested and may or may not cause
56+
problems.
2657

2758
Notes on iTerm2
2859
---------------
@@ -55,11 +86,6 @@ Selects the action that the test framework performs.
5586
and --expected-terminal) that have known bugs. This is useful when looking for
5687
looking for bugs to fix in your terminal.
5788

58-
--disable-xterm-checksum-bug
59-
xterm's implementation of DECRQCRA (as of patch 314) contains a bug. DECRQCRA is
60-
essential to these tests. By default, a workaround for the bug is used. If it is
61-
fixed in the future, this flag should be given until the workaround is dropped.
62-
6389
--include=regex
6490
Only tests whose name matches "regex" will be run.
6591

esctest/esc.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import escargs
22

33
NUL = chr(0)
4+
BEL = chr(7)
45
BS = chr(8)
56
TAB = chr(9)
67
LF = chr(10)
@@ -18,8 +19,8 @@
1819
vtLevel = 1
1920

2021
def blank():
21-
if escargs.args.expected_terminal == "xterm":
22-
return ' '
23-
else:
24-
return NUL
22+
if escargs.args.expected_terminal == "xterm":
23+
return ' '
24+
else:
25+
return NUL
2526

esctest/escargs.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66
XTERM_WINOPS_ENABLED = "xtermWinopsEnabled"
77
DISABLE_WIDE_CHARS = "disableWideChars"
88

9-
ACTION_RUN="run"
10-
ACTION_LIST_KNOWN_BUGS="list-known-bugs"
9+
ACTION_RUN = "run"
10+
ACTION_LIST_KNOWN_BUGS = "list-known-bugs"
1111

1212
parser = argparse.ArgumentParser()
13-
parser.add_argument("--disable-xterm-checksum-bug",
14-
help="Don't use buggy parameter order for DECRQCRA",
15-
action="store_true")
1613
parser.add_argument("--include",
1714
help="Regex for names of tests to run.",
1815
default=".*")
@@ -24,8 +21,8 @@
2421
help="Print logs after finishing?",
2522
action="store_true")
2623
parser.add_argument("--test-case-dir",
27-
help="Create files with test cases in the specified directory",
28-
default=None)
24+
help="Create files with test cases in the specified directory",
25+
default=None)
2926
parser.add_argument("--stop-on-failure",
3027
help="Stop running tests after a failure.",
3128
action="store_true")
@@ -35,7 +32,7 @@
3532
parser.add_argument("--options",
3633
help="Space-separated options that are enabled.",
3734
nargs="+",
38-
choices=[ XTERM_WINOPS_ENABLED, DISABLE_WIDE_CHARS ])
35+
choices=[XTERM_WINOPS_ENABLED, DISABLE_WIDE_CHARS])
3936
parser.add_argument("--max-vt-level",
4037
help="Do not run tests requiring a higher VT level than this.",
4138
type=int,
@@ -50,7 +47,7 @@
5047
parser.add_argument("--action",
5148
help="Action to perform.",
5249
default=ACTION_RUN,
53-
choices=[ ACTION_RUN, ACTION_LIST_KNOWN_BUGS ])
50+
choices=[ACTION_RUN, ACTION_LIST_KNOWN_BUGS])
5451
parser.add_argument("--timeout",
5552
help="Timeout for reading reports from terminal.",
5653
default=1,

0 commit comments

Comments
 (0)