cells tests: a break before a dropped mark is kept

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-28 09:06:51 +01:00
commit 4188ef5d20

View file

@ -118,6 +118,8 @@ fn wrap_table() {
assert_eq!(lines("", 5), [""]);
assert_eq!(lines("a\n\nb", 5), ["a", "", "b"]);
assert_eq!(lines("a\n", 5), ["a"]);
// A break opportunity that falls before a dropped mark (LRM here) is kept for the next cluster.
assert_eq!(lines("a \u{200e}bcd", 3), ["a", "bcd"]);
// A cluster never splits, however narrow the room.
assert_eq!(lines("\u{1f468}\u{200d}\u{1f469}", 1), ["\u{1f468}\u{200d}\u{1f469}"]);
assert_eq!(lines("e\u{301}e\u{301}", 1), ["e\u{301}", "e\u{301}"]);