diff options
| author | Craig Jennings <c@cjennings.net> | 2025-10-26 21:21:38 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-10-26 21:21:38 -0500 |
| commit | 56ccf15be4eb663b21f788d164147b9acff12772 (patch) | |
| tree | 0b2e002005813c1c6fcce80ec32ea218c8a7ffbe /tests/test-custom-ordering-arrayify.el | |
| parent | ba447b1af181cf59d021c66f69e6453ea5450ec6 (diff) | |
| download | dotemacs-56ccf15be4eb663b21f788d164147b9acff12772.tar.gz dotemacs-56ccf15be4eb663b21f788d164147b9acff12772.zip | |
test+fix:custom-misc: add tests and fix fraction glyph bug
Add test coverage for 4 functions in custom-misc.el:
- cj/replace-fraction-glyphs (24 tests)
- cj/format-region-or-buffer (17 tests)
- cj/count-words-buffer-or-region (20 tests)
- cj/jump-to-matching-paren (18 tests)
Refactored functions using internal/interactive split pattern:
- Internal functions (cj/--function-name) contain business logic with
explicit parameters and validation
- Interactive wrappers handle UI concerns (region detection, messages)
- Tests call internal functions directly (no mocking required)
Bug Fix: cj/--replace-fraction-glyphs
Fixed "Invalid search bound" error when converting glyphs to text.
Original code used fixed end position which became invalid when
replacements changed buffer size. Fixed by using copy-marker for
dynamic end position tracking.
Diffstat (limited to 'tests/test-custom-ordering-arrayify.el')
0 files changed, 0 insertions, 0 deletions
