terminal/src/interactivity
Carlos Zamora 5deb332607
Fix UIA Word movement tests (#11253)
## Summary of the Pull Request
Fixes the 24 failing generated tests. 20 of them were fixed by enforcing the following rule: when moving backwards by word...
- a degenerate range moves to the beginning of the word, then to the word behind it.
- a non-degenerate range outright moves to the word behind it.

The fix was simple: if we're a degenerate range, check if we're at the beginning of the word. If not, move there. Otherwise, move to the word before it. See UiaTextRangeBase.cpp changes for implementation details.

Along the way, several misauthored tests were found:
- 2 generated tests:
   - Cause: MS Word considers a line break a word delimiter. We don't use line-wrapping to distinguish two separate words.
- `MovementAtExclusiveEnd` backwards word movement tests:
   - `end` will always be `writeTarget` because...
      - [degenerate range case] both `start` and `end` are moved to the beginning of the word (`writeTarget`)
      - [non-degenerate range case] from the `UiaTextRangeBase` bugfix, we should be moving to the word behind it.
   - this misauthored test was explicitly found by fixing the bug first explained here.

## References
#10925 Word navigation testing
2021-09-22 17:50:34 +00:00
..
base Fix building with v143 toolchain (#10727) 2021-07-20 19:00:49 +02:00
inc Skip accessibility notifier and all event calculations when we're in PTY mode (#10569) 2021-07-09 18:45:44 +00:00
onecore Add support for downloadable soft fonts (#10011) 2021-08-06 20:41:02 +00:00
win32 Fix UIA Word movement tests (#11253) 2021-09-22 17:50:34 +00:00
dirs Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00