|
|
@ -1474,7 +1474,7 @@ mod test {
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let selection =
|
|
|
|
let selection =
|
|
|
|
selection.transform(|r| move_prev_paragraph(text.slice(..), r, 1, Movement::Move));
|
|
|
|
selection.transform(|r| move_prev_paragraph(text.slice(..), r, 1, Movement::Move));
|
|
|
|
let actual = crate::test::plain(&s, &selection);
|
|
|
|
let actual = crate::test::plain(s.as_ref(), &selection);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1497,7 +1497,7 @@ mod test {
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let selection =
|
|
|
|
let selection =
|
|
|
|
selection.transform(|r| move_prev_paragraph(text.slice(..), r, 2, Movement::Move));
|
|
|
|
selection.transform(|r| move_prev_paragraph(text.slice(..), r, 2, Movement::Move));
|
|
|
|
let actual = crate::test::plain(&s, &selection);
|
|
|
|
let actual = crate::test::plain(s.as_ref(), &selection);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1520,7 +1520,7 @@ mod test {
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let selection = selection
|
|
|
|
let selection = selection
|
|
|
|
.transform(|r| move_prev_paragraph(text.slice(..), r, 1, Movement::Extend));
|
|
|
|
.transform(|r| move_prev_paragraph(text.slice(..), r, 1, Movement::Extend));
|
|
|
|
let actual = crate::test::plain(&s, &selection);
|
|
|
|
let actual = crate::test::plain(s.as_ref(), &selection);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1562,7 +1562,7 @@ mod test {
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let selection =
|
|
|
|
let selection =
|
|
|
|
selection.transform(|r| move_next_paragraph(text.slice(..), r, 1, Movement::Move));
|
|
|
|
selection.transform(|r| move_next_paragraph(text.slice(..), r, 1, Movement::Move));
|
|
|
|
let actual = crate::test::plain(&s, &selection);
|
|
|
|
let actual = crate::test::plain(s.as_ref(), &selection);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1585,7 +1585,7 @@ mod test {
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let selection =
|
|
|
|
let selection =
|
|
|
|
selection.transform(|r| move_next_paragraph(text.slice(..), r, 2, Movement::Move));
|
|
|
|
selection.transform(|r| move_next_paragraph(text.slice(..), r, 2, Movement::Move));
|
|
|
|
let actual = crate::test::plain(&s, &selection);
|
|
|
|
let actual = crate::test::plain(s.as_ref(), &selection);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1608,7 +1608,7 @@ mod test {
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let text = Rope::from(s.as_str());
|
|
|
|
let selection = selection
|
|
|
|
let selection = selection
|
|
|
|
.transform(|r| move_next_paragraph(text.slice(..), r, 1, Movement::Extend));
|
|
|
|
.transform(|r| move_next_paragraph(text.slice(..), r, 1, Movement::Extend));
|
|
|
|
let actual = crate::test::plain(&s, &selection);
|
|
|
|
let actual = crate::test::plain(s.as_ref(), &selection);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
assert_eq!(actual, expected, "\nbefore: `{:?}`", before);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|