mirror of
https://github.com/loro-dev/loro.git
synced 2025-01-23 05:24:51 +00:00
e01505e013
* feat: add diff algorithm * feat: implement DiffHook * feat: add rust/typescript API * feat: use u8 to enable SIMD * feat: add SIMD support * test: add a failed test case * revert: change to unicode index * fix: text event index correctness when using utf8 or unicode * fix: use unicode index * fix: apply delta * fix: remove splice_unicode --------- Co-authored-by: Zixuan Chen <remch183@outlook.com>
10 lines
204 B
Rust
10 lines
204 B
Rust
use loro::LoroDoc;
|
|
|
|
#[test]
|
|
fn update_text() {
|
|
let doc = LoroDoc::new();
|
|
let text = doc.get_text("text");
|
|
text.update("ϼCCC");
|
|
text.update("2");
|
|
assert_eq!(&text.to_string(), "2");
|
|
}
|