|
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.
|