One one-line file-create entry with a single leaf: the smallest possible placeholder namespace span (branch span 1, leaf span 1).
(path: &str)
| 320 | /// One one-line file-create entry with a single leaf: the smallest possible |
| 321 | /// placeholder namespace span (branch span 1, leaf span 1). |
| 322 | fn one_line_entry(path: &str) -> FileOps { |
| 323 | let mut ops = FileOps::create(CrdtTrunkId::ROOT, path.to_string(), None); |
| 324 | ops.add_line_op(crate::change::LineOps::new( |
| 325 | CrdtBranchId::ROOT, |
| 326 | BranchOp::Insert { |
| 327 | after: None, |
| 328 | content: vec![LeafOp::Insert { |
| 329 | after: None, |
| 330 | kind: TokenKind::Word, |
| 331 | content: b"line".to_vec(), |
| 332 | }], |
| 333 | }, |
| 334 | )); |
| 335 | ops |
| 336 | } |
| 337 | |
| 338 | /// A multi-line entry: `lines` chained inserts plus `tokens` leaves per line, |
| 339 | /// with `after` references that must shift with the branch base. |
no test coverage detected