Skip to content

test(list): add comprehensive multi-byte character backspace tests#109

Merged
YousefHadder merged 1 commit intomainfrom
tests/add-missing-tests
Nov 5, 2025
Merged

test(list): add comprehensive multi-byte character backspace tests#109
YousefHadder merged 1 commit intomainfrom
tests/add-missing-tests

Conversation

@YousefHadder
Copy link
Copy Markdown
Owner

Description

Adds comprehensive test coverage for multi-byte Unicode character deletion in the backspace handler, addressing the missing tests identified in PR #107 review.

Type of Change

  • Tests added

Test Coverage Added

This PR adds 11 new test cases covering:

  • Multi-byte CJK characters (Chinese period )
  • Emoji characters (4-byte UTF-8 🎉)
  • Accented characters (2-byte UTF-8 é)
  • Sequential multi-byte character deletion
  • Edge cases (line boundaries, cursor positioning)

All tests verify correct behavior in both list and non-list contexts.

Testing

  • All 249 tests passing (90 list tests, +11 new)
  • No regressions in existing functionality

Related Issues

Addresses test coverage gap identified in PR #107 code review.

Copilot AI review requested due to automatic review settings November 5, 2025 03:14
@YousefHadder YousefHadder merged commit c4bc01a into main Nov 5, 2025
18 checks passed
@YousefHadder YousefHadder deleted the tests/add-missing-tests branch November 5, 2025 03:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive test coverage for multi-byte UTF-8 character handling in the handle_backspace function. The tests ensure that backspace correctly deletes multi-byte characters (CJK characters, emojis, accented characters) in various contexts.

  • Adds 14 new test cases covering multi-byte character deletion in lists and non-list lines
  • Tests various multi-byte UTF-8 characters (2-byte, 3-byte, and 4-byte sequences)
  • Verifies correct cursor positioning after deletion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants