terminology/tests
Boris Faure 2a3a34f503
termptyesc: handle zero-width spaces, with test
2020-02-16 18:51:36 +01:00
..
README.md tests: add first tests + test framework 2018-12-27 22:14:44 +01:00
c2.sh tests: get rid of that useless UTF8CC code 2019-02-06 22:35:12 +01:00
cbt.sh termptyesc: extract CBT handler to its own function + tests 2019-01-13 00:08:52 +01:00
cell_is_empty.sh termpty: cell is empty if bg is invisible. Closes T7707 2019-02-24 17:06:31 +01:00
cha.sh termptyesc: CHA has to take into account DECOM + tests 2019-01-01 20:19:17 +01:00
cnl.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
colors.sh tests/colors: use \033 in printf instead of \x1b 2019-01-16 18:49:55 +00:00
cpl.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
ctc.sh termptyesc: handle CTC + tests 2019-01-08 22:55:48 +01:00
cup.sh tests: CUP: test going outside margins 2019-01-01 20:30:05 +01:00
cursor-movements-alias.sh termptyesc: support aliases for cursor Up/Left + tests 2019-01-20 20:09:32 +01:00
cursor-movements.sh termptyesc: support aliases for cursor Up/Left + tests 2019-01-20 20:09:32 +01:00
cursor-shape-0.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
cursor-shape-1.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
cursor-shape-2.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
cursor-shape-3.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
cursor-shape-4.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
cursor-shape-5.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
cursor-shape-6.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
cursor-shape-7.sh tests: on cursor shapes and regen tests.results 2018-12-27 22:14:44 +01:00
da.sh tests: use shorter sleeps to speed up test execution 2019-02-20 23:12:13 +01:00
dch.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decaln.sh tests: ensure DECALN moves cursor to 0;0 2019-01-01 18:12:08 +01:00
decawm.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decbi.sh termptyesc: support DECFI 2018-12-28 23:11:54 +01:00
deccara-no-rectangular-no-restrict-cursor.sh termptyesc: DECCRARA/DECRARA when not in rectangle mode + tests 2018-12-29 22:13:58 +01:00
deccara-no-rectangular-restrict-cursor.sh termptyesc: DECCRARA/DECRARA when not in rectangle mode + tests 2018-12-29 22:13:58 +01:00
deccara-rectangular-no-restrict-cursor.sh termptyesc: handle deccara in its rectangular form + tests 2018-12-29 16:58:36 +01:00
deccara-rectangular-restrict-cursor.sh termptyesc: handle deccara in its rectangular form + tests 2018-12-29 16:58:36 +01:00
deccra.sh termptyesc: support DECCRA + tests 2019-01-01 18:12:06 +01:00
decera-decfra-extra.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decera-no-restrict-cursor.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decera-restrict-cursor.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decfi.sh termptyesc: refuse no value on decfra on the character to fill up + tests 2018-12-29 15:19:31 +01:00
decfra-decera-default-values-no-restrict-cursor.sh termptyesc: refuse no value on decfra on the character to fill up + tests 2018-12-29 15:19:31 +01:00
decfra-decera-default-values-restrict-cursor.sh termptyesc: refuse no value on decfra on the character to fill up + tests 2018-12-29 15:19:31 +01:00
decfra-no-restrict-cursor.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decfra-restrict-cursor.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decic-decdc.sh termptyesc: support DECIC/DECDC + tests 2018-12-30 18:36:27 +01:00
decrara-no-rectangular-no-restrict-cursor.sh termptyesc: DECCRARA/DECRARA when not in rectangle mode + tests 2018-12-29 22:13:58 +01:00
decrara-no-rectangular-restrict-cursor.sh termptyesc: DECCRARA/DECRARA when not in rectangle mode + tests 2018-12-29 22:13:58 +01:00
decrara-rectangular-no-restrict-cursor.sh termptyesc: DECCRARA/DECRARA when not in rectangle mode + tests 2018-12-29 22:13:58 +01:00
decrara-rectangular-restrict-cursor.sh termptyesc: DECCRARA/DECRARA when not in rectangle mode + tests 2018-12-29 22:13:58 +01:00
decsclm.sh tests: avoid using $ in printf 2018-12-28 17:58:53 +01:00
decst8c.sh termptyesc: support DECST8C + tests 2019-01-07 23:13:52 +01:00
decswbv.sh termptyesc: handle DECSWBV + tests 2019-01-26 22:27:44 +01:00
dl.sh termptyesc: DL moves the cursor to left margin + tests 2019-01-06 22:30:09 +01:00
dsr-cpr.sh tests: use shorter sleeps to speed up test execution 2019-02-20 23:12:13 +01:00
dsr-deccksr.sh termptyesc: add support DSR-DECCKSR + test 2018-12-27 22:14:44 +01:00
dsr-dir.sh termptyesc: handle DSR-DIR (Data Integrity Report) + test 2018-12-27 22:14:44 +01:00
dsr-kbd.sh tytest: add write buffer to checksum 2018-12-27 22:14:44 +01:00
dsr-msr.sh termptyesc: support DSR-MSR (0 Macro Space) + test 2018-12-27 22:14:44 +01:00
dsr-os.sh termptyesc: support DSR-OS + test 2018-12-27 22:14:44 +01:00
dsr-pp.sh termpty: support DSR-PP (Printer Port) + test 2018-12-27 22:14:44 +01:00
dsr-udk.sh termptyesc: support DSR-UDK + test 2018-12-27 22:14:44 +01:00
ech.sh termptyesc: extract ECH handler to its own function + test 2019-01-11 23:30:43 +01:00
ed-0.sh termptyesc: move ED handler to its own functions + add tests 2019-01-02 22:41:41 +01:00
ed-1.sh termptyesc: move ED handler to its own functions + add tests 2019-01-02 22:41:41 +01:00
ed-2.sh termptyesc: move ED handler to its own functions + add tests 2019-01-02 22:41:41 +01:00
ed-3.sh termptyesc: move ED handler to its own functions + add tests 2019-01-02 22:41:41 +01:00
ed-4.sh termptyesc: move ED handler to its own functions + add tests 2019-01-02 22:41:41 +01:00
el.sh termptyesc: export EL handler to its own function + add tests 2019-01-02 23:32:38 +01:00
fonts.sh update tests to reflect changes on double-width handling 2019-04-22 22:39:42 +02:00
hang-invalid-truecolors.sh termptyesc: fix hangs spotted by afl-fuzz + tests 2019-03-18 22:34:21 +01:00
hpa.sh termptyesc: CHA and HPA are the same 2019-01-19 22:10:12 +01:00
hvp.sh tests: add some on HVP 2019-01-20 18:50:52 +01:00
ich.sh tests: ICH with amount=0 2019-01-01 18:29:44 +01:00
il.sh tests: add missing il.sh 2019-01-05 23:14:00 +01:00
link_detection.sh tests: fix printf usage on alpine 2019-09-15 22:33:44 +02:00
mouse_reporting_mode_all_ext_none.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
mouse_reporting_mode_all_ext_sgr.sh tests: add some on mouse reporting in mode "all", SGR reporting 2019-03-05 22:25:43 +01:00
mouse_reporting_mode_all_ext_urxvt.sh tests: add some on mouse reporting in mode "all", urxvt reporting 2019-03-05 23:10:04 +01:00
mouse_reporting_mode_all_ext_utf8.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
mouse_reporting_mode_mouse_move_pressed_ext_none.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
mouse_reporting_mode_mouse_move_pressed_ext_sgr.sh tests: add some on mouse reporting in ext move while pressed mode, sgr reporting 2019-03-04 23:44:16 +01:00
mouse_reporting_mode_mouse_move_pressed_ext_urxvt.sh tests: add some on mouse reporting in ext move while pressed mode, urxvt reporting 2019-03-05 23:03:35 +01:00
mouse_reporting_mode_mouse_move_pressed_ext_utf8.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
mouse_reporting_mode_normal_ext_none.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
mouse_reporting_mode_normal_ext_sgr.sh tests: add some on mouse reporting in normal mode, sgr reporting 2019-03-04 23:30:09 +01:00
mouse_reporting_mode_normal_ext_urxvt.sh tests: add some on mouse reporting in normal mode, URXVT reporting 2019-03-05 23:00:32 +01:00
mouse_reporting_mode_normal_ext_utf8.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
mouse_reporting_mode_x10_ext_none.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
mouse_reporting_mode_x10_ext_sgr.sh tests: add some on mouse reporting in X10 mode, SGR reporting 2019-03-04 22:50:20 +01:00
mouse_reporting_mode_x10_ext_urxvt.sh tests: add some on mouse reporting in X10 mode, URXVT reporting 2019-03-05 22:59:18 +01:00
mouse_reporting_mode_x10_ext_utf8.sh termiointernals: handle mouse wheel with alt + tests 2019-03-04 23:05:40 +01:00
osc-11-query.sh termptyesc: handle OSC 11 that reports background color 2019-05-26 23:02:53 +02:00
rep.sh termptyesc: extract REP handler to its own function + tests 2019-01-19 23:02:51 +01:00
resize_window_no_content_change.sh termptyesc: resize parameters were inverted 2019-03-03 15:55:01 +01:00
run_tests.sh tests/termptyesc: handle DECSACE 2018-12-29 17:21:07 +01:00
sd.sh termptyesc: extract SD/SU to their own functions 2019-01-06 23:01:52 +01:00
selection_all_directions.sh tests: add some selections in all directions 2019-02-16 18:12:41 +01:00
selection_box_all_directions.sh tests: add some on box selections in all directions 2019-02-16 20:08:31 +01:00
selection_box_drag.sh tests: ensure selection is removed in dragging test 2019-02-23 11:26:33 +01:00
selection_box_simple.sh tests: add some on box selections (with ctrl) 2019-02-14 22:18:00 +01:00
selection_box_to_paragraph.sh tests: update tests due to fix in previous commit 2019-02-25 23:03:51 +01:00
selection_box_to_position.sh tests: update tests due to fix in previous commit 2019-02-25 23:03:51 +01:00
selection_box_to_word.sh tests: fix wrong escape code in selection_box_to_word.sh 2019-09-15 20:58:17 +02:00
selection_double_click.sh tests: add some on double click selection 2019-02-18 20:59:01 +01:00
selection_drag.sh tests: do not keep corners on if click shall invalidate selection 2019-02-21 18:53:18 +01:00
selection_empty_lines.sh tests: add one about selecting over empty lines 2019-11-21 21:50:18 +01:00
selection_in_history.sh add test about bug fixed in e33d07f492 2019-09-02 22:59:26 +02:00
selection_invalidation_line_removed.sh tests: add one on selection invalidation when line got removed 2019-02-27 20:06:34 +01:00
selection_invisible.sh tests: add some tests on selection from/to invisible area 2019-02-23 11:22:35 +01:00
selection_over_multiple_lines.sh tests: not left-trimming 2019-02-23 17:42:39 +01:00
selection_scrolls.sh tests: add a test about selection keeping up while text is scrolling 2019-02-18 22:28:33 +01:00
selection_simple.sh tests: use correct escape code 2019-02-23 17:41:54 +01:00
selection_to_paragraph.sh tests: add some on selection *to* paragraphs 2019-02-24 16:20:03 +01:00
selection_to_position.sh tests/selection_to_position.sh: add "TO" within selection 2019-02-23 20:11:24 +01:00
selection_to_word.sh termiointernals: rewrite _sel_word_to() + update tests 2019-02-25 22:02:11 +01:00
selection_triple_click.sh tests: add some on triple-click selections 2019-02-18 22:09:37 +01:00
selection_with_margins_scrolled.sh tests: add case where selection while text is scrolled in margins 2019-02-19 19:17:50 +01:00
selection_with_tabs.sh tests: works better with the file being committed xD 2019-10-27 16:21:03 +01:00
selection_word_regression.sh termiointernals: fix regression on selecting word at start of line 2019-03-21 22:18:07 +01:00
sgr-leading-trailing-semicolon.sh termptyesc: handle CSI_ARG_ERROR in some SGR. 2018-12-27 22:14:44 +01:00
sgr-long.sh termptyesc: 98/108 are not valid color codes + test 2018-12-27 22:14:44 +01:00
sgr-truecolors.sh termptyesc: fix truecolors parsing + tests 2018-12-27 22:14:44 +01:00
shift_in_out.sh tests: fix shift_in_out.sh tests to output ascii in [0x20, 0x7f[ 2019-03-13 14:15:43 +01:00
su.sh termptyesc: extract SD/SU to their own functions 2019-01-06 23:01:52 +01:00
tabs.sh tests: add one on tabs 2018-12-27 22:14:44 +01:00
tbc.sh termptyesc: extract TBC to its own function + tests 2019-01-08 23:16:06 +01:00
tests.results termptyesc: handle zero-width spaces, with test 2020-02-16 18:51:36 +01:00
text_append_after_right_margin.sh termptyops: do not wrap to left margin when already past right margin 2019-01-12 16:14:14 +01:00
uts.sh termptyesc: support Unset Tab Stop (only VTE so far) + tests 2019-01-20 12:06:19 +01:00
vpa.sh termptyesc: export VPA handler to its own function + tests 2019-01-20 18:44:08 +01:00
xterm-osc-0-title-icon.sh termptyesc: act like xterm, do not report title/icon-name 2018-12-27 22:14:44 +01:00
xterm-osc-1-icon.sh termptyesc: act like xterm, do not report title/icon-name 2018-12-27 22:14:44 +01:00
xterm-osc-2-title.sh termptyesc: act like xterm, do not report title/icon-name 2018-12-27 22:14:44 +01:00
zero-width-spaces.sh termptyesc: handle zero-width spaces, with test 2020-02-16 18:51:36 +01:00

README.md

Very small test framework for Terminology

Goal

Avoid regressions in Terminology's code that parse and interprets escape codes.

Dependencies

  • tytest, compiled with -D tests=true when running meson
  • a posix shell

Tytest

tytest is a simple binary that takes escape codes in input and output an md5 sum. This checksum is computed on the state of terminology after parsing and interpreting those escape codes.

Test cases

Test cases are simple shell scripts that output escape codes.

How to run the tests

A shell script called run_tests.sh is provided to run all the tests given in a test results file. See run_tests.sh --help for more information.

Test results file

When running a test through tytest, an md5 sum is computed. This checksum is stored with the name of the test in a file called tests.results. If terminology's behaviour changed, then the checksum will change. This will be noticed by run_tests.sh and will show those tests as failed.