Update tests to compile again.
This commit is contained in:
@@ -45,7 +45,7 @@ impl<'s> OrgSource<'s> {
|
||||
}
|
||||
|
||||
pub fn get_preceding_character(&self) -> Option<char> {
|
||||
todo!()
|
||||
self.preceding_character
|
||||
}
|
||||
|
||||
pub fn is_at_start_of_line(&self) -> bool {
|
||||
@@ -357,4 +357,12 @@ mod tests {
|
||||
assert_eq!(input.slice(6..).is_at_start_of_line(), true);
|
||||
assert_eq!(input.slice(6..).slice(10..).is_at_start_of_line(), false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preceding_character_unicode() {
|
||||
let input = OrgSource::new("🧡💛💚💙💜");
|
||||
assert_eq!(input.get_preceding_character(), None);
|
||||
assert_eq!(input.slice(8..).get_preceding_character(), Some('💛'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user