summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 14:13:25 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit7284b72396398213356577345151bd79e497d27c (patch)
tree60e98eed31c4469b967f427996a8767eaaea77d8 /test
parent0de2e7f04977b22df3f7b6ab1690eb8a6c905cd4 (diff)
downloadpardes-7284b72396398213356577345151bd79e497d27c.tar.gz
pardes-7284b72396398213356577345151bd79e497d27c.zip
Paint a body with context rows once, into its layer, and join it
joinBody replaces the second paint of a file body with compact tree-sitter context rows: the body is painted once into its body layer (more rows than the grid has) and the grid's body rows are copies of the layer's first ones; the rail is the grid's alone, from its region. Which rows are context rows is still decided by a text build before the paint, and a body without them reuses that text and paints straight onto the grid: every other body has no row the grid cannot show, so it gets no layer and no copy. Each part now paints only its own rows. The tag paints the tag rows of every pointer sweep that crosses them (the select sweep in the tag's colours, the look-hover affordance over it, a middle or right sweep over both in its button's tint), which the body used to paint over the tag on the grid alone; the body paints only body rows, and a select sweep begun on the tag marks the body rows it crossed before the text is laid down, as it did. Grid and layers agree, the snapshot goldens are byte-identical, and a test checks the joined grid rows and caret against a plain paint of the same body with the tag on top and at the bottom. The GUI goldens gain a terminal pane scene.
Diffstat (limited to 'test')
-rw-r--r--test/gui-goldens.txt1
-rw-r--r--test/gui_golden.py8
2 files changed, 9 insertions, 0 deletions
diff --git a/test/gui-goldens.txt b/test/gui-goldens.txt
index 73aa1f86..e52155a3 100644
--- a/test/gui-goldens.txt
+++ b/test/gui-goldens.txt
@@ -14,3 +14,4 @@
14-theme-ink 6e733d4212373c90b860b2e41102ced8719b07480591b5da3905267c8358db18
15-theme-acme-light e099dc1a351de8efa63ecd0ec0899636ea31b722a945eb40137a18abd87a82e2
16-debug e97ce74b7a3d4a08f6a529b1f0de111d62e5532c829a6b1633b966dd45218f55
+17-terminal 304a84d1ef871f581d0a3fade9bc1acdcc87a3612c607548ab0d2851871753ee
diff --git a/test/gui_golden.py b/test/gui_golden.py
index 1252014c..327911cc 100644
--- a/test/gui_golden.py
+++ b/test/gui_golden.py
@@ -188,6 +188,14 @@ def run(args):
scene('15-theme-acme-light')
client.write('/ctl', b'Debug\n')
scene('16-debug')
+ client.write('/ctl', b'Debug\n')
+ # A terminal pane: raw rows, ANSI colours, a hidden prompt.
+ before = set(panes(client))
+ client.write(f'/pane/{first}/exec', b'Tty\n')
+ terminal = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'Tty missing')
+ client.write(f'/pane/{terminal}/pty/data', b"PS1='$ '; clear; printf '\\033[1;36mcolour\\033[0m plain \\033[32mgreen\\033[0m\\n'\r")
+ require(wait_for(lambda: b'green' in client.read(f'/pane/{terminal}/body')), 'terminal output missing')
+ scene('17-terminal')
lines = ''.join(f'{label} {digest}\n' for label, digest in results)
if args.update:
GOLDENS.write_text(lines)