Integration: GREP lookbehind overlay test passes the drop-cap end (#425)

next's overlays() takes the drop cap's end as a fifth argument; the test from #316 calls it with 0, like the other overlay tests.
This commit is contained in:
aiongg
2026-10-11 02:20:00 +00:00
parent 037771057e
commit cffff885bb
+1 -1
View File
@@ -129,7 +129,7 @@ mod tests {
fn grep_style_with_lookbehind() {
// Polish one-letter words kept with the next one; the space before is not styled.
let text = "Ala i kot w domu.\n".to_string();
let o = overlays(&text, 0..text.len(), &[], &[GrepStyle { style: "nobreak".into(), pattern: r"(?<=\s)[aiouwzAIOUWZ]\s".into() }]);
let o = overlays(&text, 0..text.len(), &[], &[GrepStyle { style: "nobreak".into(), pattern: r"(?<=\s)[aiouwzAIOUWZ]\s".into() }], 0);
let got: Vec<&str> = o.iter().map(|(r, _)| &text[r.clone()]).collect();
assert_eq!(got, ["i ", "w "]);
}