Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanarijit committed Nov 13, 2022
1 parent b137b8f commit ed29214
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,4 +562,12 @@ mod tests {
assert_eq!(input.value(), "¡☆test☆¡");
assert_eq!(input.cursor(), 2);
}

#[test]
fn multispace_characters() {
let input: Input = "Hello, world!".into();
assert_eq!(input.cursor(), 13);
assert_eq!(input.visual_cursor(), 23);
assert_eq!(input.visual_scroll(6), 18);
}
}

0 comments on commit ed29214

Please sign in to comment.