Add unit test for rope with all 4-byte chars
This commit is contained in:
@@ -403,6 +403,14 @@ mod tests {
|
||||
use rand::prelude::*;
|
||||
use std::env;
|
||||
|
||||
#[test]
|
||||
fn test_all_4_byte_chars() {
|
||||
let mut rope = Rope::new();
|
||||
let text = "🏀".repeat(256);
|
||||
rope.push(&text);
|
||||
assert_eq!(rope.text(), text);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_random() {
|
||||
let iterations = env::var("ITERATIONS")
|
||||
|
||||
Reference in New Issue
Block a user