test(backspace): golden-master backspace corpus for #31 (#21)#72
Merged
Conversation
Adds 10 backspace regression tests to InputLogicTest (the #31 safety net): default per-char delete (composing/committed/recompose), the PR-#11 'precool' word-mash corruption guard, combining whole-word delete, cursor-in-middle recompose, legacy fragment-pop, and two monotonicity invariants. Assertions are observable (editor + composing text) only, so they survive the #31 input-unit-stack refactor that removes mGestureFragmentBoundaries. The multi-stroke gesture-extension case is @ignore'd (not JVM-simulable; documented for on-device verification). 9 active tests green; 1 @ignore; no new failures vs the InputLogicTest baseline (3 pre-existing env failures unchanged).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21. The safety net for the #31 backspace-stack refactor.
What
Adds 10 backspace regression tests to
InputLogicTest(reuses the existing Robolectric harness — no new shadows), each documenting the user-facing behavior contract it locks:precoolcorruption guard — the PR-Two-thumb typing: manual-spacing fixes, live-converge, backspace corr… #11 class: combining whole-word delete of "cool" in "This is pretty cool" must not mash to "This is precool"Why observable-only
Assertions check editor text + composing text, never internal fields. #31 deletes
mGestureFragmentBoundaries, so asserting boundary lists would be a false regression signal — these tests survive a behavior-preserving refactor by design.Notes
@Ignore) covers multi-stroke gesture-extension fragment-pop — the JVM harness can't simulate combining-mode extension across twogestureInput()calls (they append, not extend → "techtechnology"); documented expected-vs-actual for on-device verification.COMBINING_BACKSPACE_DELETES_GESTURE_WORD=false(defaults true, else line ~1339 bails to whole-word delete), and the monotonicity loops must stop at empty (the mock IC throws on delete-from-empty; real editors no-op).Verification
:app:testOfflineDebugUnitTest --tests "*InputLogicTest"→ 103 completed, 3 failed, 1 skipped. The 3 failures are the AGENTS.md-documented pre-existing ones (...AutospaceIndicator,insertLetterIntoWordHangulFails,revert autocorrect on delete) — unchanged baseline. All 9 active corpus tests green; 0 new failures.