Add tests: $match should match sibling OR parent docs, not both #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
$matchin a multi-doc stream can match either sibling documents in the same file or documents from parent files. The code infindMatchesprioritizes parents: if any parent doc matches, siblings are not checked. This is intentional but has no dedicated test coverage.Requested tests:
$matchmatches a parent document:a.yaml:
a.b.yaml:
Expected:
{name: x, val: 1, z: 1}$matchmatches a sibling document in the same file:a.yaml:
Expected:
{name: x, val: 1, z: 1}$matchmatches sibling but leaves non-matching sibling alone:a.yaml:
Expected:
{name: x, val: 1, z: 1}and{name: y, val: 2}