diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 17:49:34 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 17:49:34 +0300 |
| commit | 4384435941b8c7658856b381d071aee2e0035e89 (patch) | |
| tree | 5ece99c3dd1decb8ec3fd404c0ece2b5865a552a /tests/extern/README.md | |
term: move the term core to subprojects/term
The core now builds, tests, and benchmarks alone, as a Meson subproject
with no dependency on the main tree.
- include/term/ holds term.h and the header-only unicode/. src/ holds
the core and its private headers. The main tree gets only
include/term through term_dep, so it cannot reach a private header.
- The term tests, the term benchmarks, the Kitty parser suite, and
tools/amalgamate.py and tools/generate_unicode.py move with it. The
tests run as term:<name>.
- The main build passes its -march (arch_flag) and b_ndebug to the
subproject. A directory configured before this commit needs
meson configure -Dterm:arch_flag=-march=... once.
- The term tests compile with -UNDEBUG. They do work inside assert.
- The subproject exports term_test_dep with term_api.h, for the main
tree's render, thumbnail, color, and selection tests.
- The Kitty bridge used struct vector2i and has not compiled since the
public API redesign. It builds again. 2 of its 14 tests fail: REP
after a tab, and a cursor report after a resize.
- dirgraph.py drops the term and unicode layers. Its self-test uses pty.
- The symbols test ignores the __odr_asan symbols that ASan adds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/extern/README.md')
| -rw-r--r-- | tests/extern/README.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/extern/README.md b/tests/extern/README.md new file mode 100644 index 0000000..cff42ed --- /dev/null +++ b/tests/extern/README.md @@ -0,0 +1,43 @@ +# Imported test suites + +This directory holds test suites imported from external projects. These are +kept for reference and cross-checking against our own terminal emulator's +behavior. On Linux, `make test` builds and runs the adapted Kitty parser suite. + +## kitty/ + +Vendored from <https://github.com/kovidgoyal/kitty>, commit `f13c8cd4`. + +### Running the adapted suite + +```sh +meson test -C build --suite kitty +``` + +This builds `kitty_bridge` (a shared library compiled from +the project's terminal sources), then runs the +Kitty parser test suite against it via a Python compatibility layer. + +### Files + +- `kitty/parser.py` — Kitty's VT/CSI parser test suite (`kitty_tests/parser.py`), + with imports patched to use the local compatibility modules below. +- `kitty_parser.py` — Pure-Python VT parser that emits Kitty-style callback + events while feeding every byte to the C terminal via `screen.write()`. + Maintains state across calls for split-write (threading) tests. +- `screen.py` — `ctypes` wrapper around `libterm.so` providing the Kitty + `Screen`, `Cursor`, `Line`, `CellCursor`, and `Callbacks` API. +- `fast_data_types.py` — Pure-Python replacements for Kitty's C-extension + helpers (base64, UTF-8 decode, constants). +- `kitty_harness.py` — `BaseTest`, `CmdDump`, and `parse_bytes` re-export. +- `__init__.py` — Package marker. + +### Test status (14 tests) + +All 14 tests pass. Features implemented for Kitty parity include DEC +Special Graphics charset translation (G0/G1, SO/SI), literal `\t` cells, +LNM-default-off linefeed semantics, CSI insert-character and REP edge +cases, DECRQM mode reports, DECRQSS (DCS `$q`) and XTGETTCAP (DCS `+q`) +responses, DECCARA/DECSACE (CSI `$r` / `*x`), secondary device attributes +(CSI `=c`), XTWINOPS cell-size report (CSI `14t`), underline styles 0–5, +and SGR underline color (58/59) including colon-form subparameters. |
