test(terminal): pin that a base keeps every stacked combining mark

The combining-mark cases carry exactly one mark — `e` + U+0301, and
❤ + U+FE0F. Thai routinely stacks two on one consonant: `ที่` is U+0E17
with an above-base vowel and a tone mark both sitting on it, and
Devanagari, Arabic and Hebrew stack the same way.

Nothing pinned that. Truncating the mark iterator to its first element
leaves all thirteen `segment_row` tests green — the cluster still forms,
still spans one column, and still leaves its neighbour intact. Only the
trailing codepoint goes missing, which in Thai is the one carrying the
tone: ไม่ (not) and ไม้ (wood) both collapse to ไม.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
mingrath
2026-07-27 11:42:15 +07:00
co-authored by Claude Opus 5
parent d3064e40f5
commit 28aa52de20
+9
View File
@@ -2146,6 +2146,15 @@ mod tests {
let mut row = wide_cells("\u{2764}");
row[0].marks = Some(Box::from(['\u{FE0F}']));
assert_eq!(segment_row(&row), [cluster(0, 2, "\u{2764}\u{FE0F}")]);
// Several marks on one base: an above-base vowel and a tone mark both
// sit on the consonant (ที่ = ท U+0E17 + ◌ี U+0E35 + ◌่ U+0E48).
let mut row = vec![cell('\u{0E17}'), cell('a')];
row[0].marks = Some(Box::from(['\u{0E35}', '\u{0E48}']));
assert_eq!(
segment_row(&row),
[cluster(0, 1, "\u{0E17}\u{0E35}\u{0E48}"), run(1, 1, "a")]
);
}
/// A marked cell never joins a batch: marks add characters without adding