[PR #7792] Properly handle and test a11y movement at end of buffer #26992

Open
opened 2026-01-31 09:19:21 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/7792

State: closed
Merged: Yes


Summary of the Pull Request

The MovementAtExclusiveEnd test was improperly authored for the
following reasons:

  • it should have used TEST_METHOD_PROPERTY to cover all of the
    TextUnits
  • TextUnit::Document (arguably one of the most important) was ommitted
    accidentally (!= TextUnit_Document was used instead of <=)
  • The created range was not EndExclusive, but rather, the last cell in
    the buffer (EndInclusive)

The first half of this PR fixes the test.

The second half of this PR expands the test and fixes any related issues
to make the test pass (i.e. #7771):

  • TEST_METHOD_PROPERTY was added for it to be degenerate (start/end at
    EndExclusive) or not (last cell of buffer)
  • utr->_start is now also validated after moving backwards

NOTE: utr->_start was not validated when moving forwards because
moving forwards should always fail when at/past the last chell in the
buffer.

Closes #7771

**Original Pull Request:** https://github.com/microsoft/terminal/pull/7792 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request The `MovementAtExclusiveEnd` test was improperly authored for the following reasons: - it should have used `TEST_METHOD_PROPERTY` to cover all of the TextUnits - TextUnit::Document (arguably one of the most important) was ommitted accidentally (`!= TextUnit_Document` was used instead of `<=`) - The created range was not `EndExclusive`, but rather, the last cell in the buffer (`EndInclusive`) The first half of this PR fixes the test. The second half of this PR expands the test and fixes any related issues to make the test pass (i.e. #7771): - `TEST_METHOD_PROPERTY` was added for it to be degenerate (start/end at `EndExclusive`) or not (last cell of buffer) - `utr->_start` is now also validated after moving backwards NOTE: `utr->_start` was not validated when moving forwards because moving forwards should always fail when at/past the last chell in the buffer. Closes #7771
claunia added the pull-request label 2026-01-31 09:19:21 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26992