Improve docs

This commit is contained in:
Andras Schmelczer 2025-07-06 12:28:46 +01:00
parent 2a4b5dd496
commit 077ba9416a
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
6 changed files with 23 additions and 162 deletions

View file

@ -2,44 +2,6 @@
This directory contains YAML test cases that demonstrate various reconcile scenarios.
## Format
Each YAML file contains test documents with the following structure:
```yaml
parent: "Original text"
left:
text: "Left version"
cursors:
- id: 1
char_index: 5
right:
text: "Right version"
cursors:
- id: 2
char_index: 10
expected:
text: "Expected result"
cursors:
- id: 1
char_index: 8
- id: 2
char_index: 12
```
## Cursor Position Notation
In some test cases, the `|` character is used to denote cursor positions within the text. These characters are stripped before the actual reconcile logic is run, making it easier to visualize where cursors should be positioned.
## Running Tests
These examples are automatically tested as part of the test suite:
```bash
cargo test
```
The tests verify that:
1. Text is merged correctly without conflicts
2. Cursor positions are updated accurately
3. The merge result is consistent regardless of argument order (left/right swap)