mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-31 23:59:12 +00:00
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:
1 parent
037771057e
commit
cffff885bb
1 file changed
+1
-1
@@ -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 "]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user