terminology/tests
Boris Faure 89a6a9d652 termptyesc: extract ECH handler to its own function + test
Test is not fully working at the moment.
There seems to be an issue with appending text outside margins
2019-01-11 23:30:43 +01:00
..
README.md tests: add first tests + test framework 2018-12-27 22:14:44 +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: add one on colors 2018-12-27 22:14:44 +01: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.sh tests/cursor-movements.sh: test cursor up for real 2019-01-01 22:46:25 +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
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
dl.sh termptyesc: DL moves the cursor to left margin + tests 2019-01-06 22:30:09 +01:00
dsr-cpr.sh termptyesc: DSR-CPR takes cursor restriction into account + test 2018-12-27 22:14:44 +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 tests: add tests on fonts: normal/italic/blod/bolditalic/fraktur/encircled 2018-12-27 22:14:44 +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
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
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
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: extract ECH handler to its own function + test 2019-01-11 23:30:43 +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

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.