Improve docs

This commit is contained in:
Andras Schmelczer 2025-07-10 21:52:03 +01:00
parent f48685237d
commit 9c79ebc653
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
5 changed files with 87 additions and 56 deletions

View file

@ -1,7 +1,16 @@
# Test Examples
This directory contains YAML test cases that demonstrate various reconcile scenarios.
This directory contains comprehensive YAML test cases that demonstrate various text reconciliation scenarios and edge cases. These examples serve both as regression tests and as documentation of the library's behaviour in different situations.
## Test Structure
Each YAML file contains test cases with the following structure:
- `parent`: The original text that both sides diverged from
- `left`: One version of the edited text
- `right`: Another version of the edited text
- `expected`: The expected merged result
- `description`: Human-readable explanation of what the test demonstrates
## 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.
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 visualise where cursors should be positioned in the test inputs and expected outputs.