| Age | Commit message (Collapse) | Author |
|
Add a new function `cj/--parse-email-string` to parse email strings
with multiple formats and separators, ensuring robust handling of
real-world email variations. This commit also includes extensive
tests for the new parsing function, covering normal, edge, and
special cases, ensuring comprehensive test coverage and reliability.
|
|
Introduce `cj/--process-webclip-content` to enhance webclip
processing by removing the first heading and demoting subsequent
headings, preserving page structure. Includes tests for thorough
validation of the new functionality.
|
|
Refined comments to note completion of module tests. Removed
outdated function and disabled a module. Adjusted 'org-roam-config'
for test addition.
|
|
Deleted `test-custom-org-agenda-functions.el.disabled` as it was
obsolete. Removed commented-out global keybinding in
`org-agenda-config.el` for clarity.
|
|
Introduce several utility functions for org-roam configuration,
including `cj/--generate-roam-slug`, `cj/--demote-org-subtree`, and
`cj/--format-roam-node`. These enhance title-to-slug conversion,
subtree demotion, and node file formatting.
Additionally, include comprehensive test cases for these functions
to ensure correctness and reliability in various scenarios.
|
|
Add line manipulation utilities: `append-to-lines`,
`prepend-to-lines`, `indent-lines`, and `dedent-lines`. Add tests
for these functions and improve existing text wrapping
functionalities with `wrap`, `unwrap`, and `surround`
implementations. Extend keymap for easier access to these functions.
|
|
Introduce new functions cj/toggle-quotes, cj/reverse-lines, and
cj/number-lines for line manipulation. cj/toggle-quotes swaps quotes
within a region, cj/reverse-lines reverse the line order, and
cj/number-lines adds line numbers with a customizable format,
supporting zero-padding. Update keymap with new bindings. Add
comprehensive tests for each function.
|
|
Enhanced cj/--arrayify with optional prefix/suffix parameters for flexible formatting:
- prefix: string to prepend (e.g., "[" or "(")
- suffix: string to append (e.g., "]" or ")")
Added convenience functions:
- cj/listify: unquoted list (a, b, c)
- cj/arrayify-json: JSON array ["a", "b", "c"]
- cj/arrayify-python: Python list ["a", "b", "c"]
Updated keybindings:
- C-; o l → cj/listify
- C-; o j → cj/arrayify-json
- C-; o p → cj/arrayify-python
- C-; o L → cj/comma-separated-text-to-lines (moved from 'l')
|
|
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.
|
|
Refactor all 4 existing whitespace functions to use interactive/non-interactive
pattern and add comprehensive testing (73 tests). Implement 2 new functions:
delete-all-whitespace (removes all whitespace) and ensure-single-blank-line
(collapses consecutive blanks to one). Add keybindings for untabify/tabify.
Total: 110 tests, 100% pass rate, 0 linter warnings.
|
|
|
|
|
|
Refactor 4 whitespace manipulation functions (remove-leading-trailing,
collapse-whitespace, delete-blank-lines, hyphenate-whitespace) to use
interactive/non-interactive pattern for testability. Add 73 tests across
4 test files covering normal, boundary, and error cases. Fix linter warnings
and add proper input validation.
|
|
|
|
Implement 5 new comment styles (simple-divider, padded-divider, heavy-box,
unicode-box, block-banner) and refactor 2 existing functions (inline-border,
comment-box) to use interactive/non-interactive pattern for testability.
Add 178 tests across 7 test files with validation for length constraints and
cross-language support. Fix linter warnings for parameter shadowing and
docstring formatting.
|
|
Add 14 unit tests for cj/comment-reformat covering:
- Emacs Lisp (12 tests): multiline joining, fill-column restoration,
unicode, indentation, empty regions, read-only buffers
- Python (1 test): hash-based comments
- C (1 test): C-style comments (converted to block style by c-mode
Fix issue where cj/comment-reformat was being called with args
|
|
Add 20 unit tests for cj/delete-buffer-comments covering:
- Emacs Lisp (14 tests): comprehensive coverage of normal/boundary/error cases
- Python (3 tests): hash-based comments (#)
- C (3 tests): C-style line (//) and block (/* */) comments
|
|
Add 58 unit tests for buffer/file utility functions:
- cj/copy-link-to-buffer-file (12 tests)
- cj/copy-path-to-buffer-file-as-kill (12 tests)
- cj/copy-whole-buffer (14 tests)
- cj/clear-to-bottom-of-buffer (10 tests)
- cj/clear-to-top-of-buffer (10 tests)
Tests cover normal cases, boundary cases (unicode, empty buffers, narrowing,
read-only buffers), and error cases.
Production code change:
- Fix linter warning: unused variable 'err' → '_' in cj/move-buffer-and-file
|
|
Add 36 unit tests for cj/delete-buffer-and-file covering:
- Normal cases: VC vs non-VC file deletion, trash flag usage
- Boundary cases: file content variations, naming edge cases, buffer states
- Error cases: permission issues, VC failures, error propagation
Key testing decisions documented in Commentary:
- Mock delete-file errors for deterministic, portable tests
- Test our code's behavior (branching logic, error propagation), not the
underlying trash/filesystem implementations
- Verify correct calls to vc-delete-file vs delete-file with trash flag
All 36 tests passing.
|
|
Add 106 unit tests with full coverage for move-buffer-and-file (51 tests)
and rename-buffer-and-file (55 tests). Refactor both functions using
interactive/non-interactive split pattern for simpler testing and reusability.
Changes:
- Split cj/move-buffer-and-file and cj/rename-buffer-and-file into internal
implementations (cj/--*) and interactive wrappers
- Add ok-if-exists parameter with user confirmation to prevent data loss
- Fix bugs: return values, path expansion, string-match arg order, regex
- Add test utilities for proper buffer cleanup and isolation
- Document interactive/non-interactive pattern in quality-engineer.org
- Document error message testing guidelines in quality-engineer.org
All 106 tests passing.
|
|
- Add 26 tests covering normal cases, boundary cases, and error cases
- Tests verify column width calculation with tabs, Unicode support, various underline characters
- Mock read-char function for batch mode testing
- All 26 tests passing on first run
|
|
- Add guard clause to handle empty string input gracefully (would cause infinite loop)
- Add 33 comprehensive tests covering normal cases, boundary cases, and error cases
- Tests verify Unicode support, regex character escaping, region vs buffer operations
- All 33 tests passing
|
|
- Add 35 tests covering normal cases, boundary cases, and error cases
- Tests verify duplicate removal with case-insensitive matching, region vs buffer operations, Unicode support
- Discovered function requires trailing newlines for duplicate detection and uses case-insensitive matching
- All 35 tests passing
|
|
- Add 31 tests covering normal cases, boundary cases, and error cases
- Tests verify duplication with/without comments, Unicode, RTL text, undo behavior, and edge cases
- All 31 tests passing
|
|
- Add 11 new tests for cj/join-line-or-region covering boundary cases, Unicode, stress testing, and undo behavior
- Fix region deactivation in cj/join-line-or-region function
- All 62 tests now passing (41 join-line-or-region + 21 join-paragraph)
|
|
Fixed and enhanced the org-roam hook that copies completed tasks to
daily notes:
- Fixed hook not triggering immediately after Emacs launch by moving it
outside the lazy-loaded use-package org-roam :config block and into
with-eval-after-load 'org
- Changed hook to trigger for ANY org-done-keyword (DONE, CANCELLED,
etc.) instead of just "DONE"
- Updated hook to only trigger on non-done → done transitions using
org-last-state, preventing duplicate copies when changing between
done states (e.g., DONE → CANCELLED)
- Added docstrings to org-roam helper functions to fix checkdoc linter
warnings
- Created comprehensive ERT test suite with 10 tests covering:
* Hook registration before org-roam loads (lazy-loading fix)
* Transitions to done states (nil→DONE, TODO→DONE, IN-PROGRESS→DONE,
WAITING→CANCELLED)
* Non-triggering cases (done→done, transitions to non-done states)
|
|
Add comprehensive test cases for the `cj/join-line-or-region` and
`cj/join-paragraph` functions within the custom-line-paragraph
module. These tests cover normal, boundary, and error cases to
ensure the proper functionality of line and paragraph joining
features. They address various scenarios including line breaks,
whitespace, Unicode content, and cursor positioning, enhancing the
robustness of existing functionality.
|
|
Introduce a new function `cj/make-buffer-undead` that appends a
buffer name to the `cj/undead-buffer-list`, preventing it from being
killed. This comes along with a suite of tests to check various
scenarios and edge cases for handling undead buffers.
Additionally, add tests for related functions:
`cj/kill-buffer-or-bury-alive`, `cj/kill-buffer-and-window`, and
others to ensure they correctly manage buffers, particularly with
undead-status considerations.
Refactor `undead-buffer-list` naming for consistency and clarity in
the module.
|
|
Introduce ERT tests for security-related functions within
dwim-shell-config. These tests encompass normal, boundary, and error
conditions to ensure:
- Passwords aren't exposed in command outputs
- Temporary files have restricted permissions (mode 600)
- Proper cleanup of temporary files post-operation
- Handling of edge cases and errors effectively
|
|
- Change base directory path from ~/.temp-gptel-tests/ to ~/.temp-emacs-tests/.
- Modify accompanying docstrings and comments to reflect this update.
|
|
|
|
|