reconcile/tests/examples
2025-07-10 21:52:03 +01:00
..
deletes.yml Add mergeTextWithHistory function 2025-06-22 20:49:11 +01:00
deletes_and_inserts.yml Merge crates 2025-06-15 11:30:07 +01:00
idempotent_inserts.yml Merge crates 2025-06-15 11:30:07 +01:00
multiline.yml Merge crates 2025-06-15 11:30:07 +01:00
README.md Improve docs 2025-07-10 21:52:03 +01:00
replacing.yml Fix cursors 2025-06-22 13:06:36 +01:00
utf-8.yml Merge crates 2025-06-15 11:30:07 +01:00
various.yml Fix wrapping 2025-07-04 02:16:17 +01:00

Test Examples

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 visualise where cursors should be positioned in the test inputs and expected outputs.