loro/crates/fuzz/tests/update_text.rs
东灯 e01505e013
feat: add text update API (#404)
* 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>
2024-07-23 21:22:47 +08:00

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");
}