<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs-wttrin/tests/test-wttrin-integration-with-debug.el, branch v0.3.0</title>
<subtitle>Emacs frontend for Igor Chubin's wttr.in weather service
</subtitle>
<id>https://git.cjennings.net/emacs-wttrin/atom?h=v0.3.0</id>
<link rel='self' href='https://git.cjennings.net/emacs-wttrin/atom?h=v0.3.0'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/'/>
<updated>2026-02-18T01:14:14+00:00</updated>
<entry>
<title>refactor: tests: standardize naming, consolidate files, and expand testutil</title>
<updated>2026-02-18T01:14:14+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-18T01:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=28b7e4cecadce207d532b8d42346c3823450a35f'/>
<id>urn:sha1:28b7e4cecadce207d532b8d42346c3823450a35f</id>
<content type='text'>
- Expand testutil-wttrin.el with shared fixtures and macros
  (testutil-wttrin-with-clean-weather-buffer,
  testutil-wttrin-mock-http-response, sample ANSI/weather constants)
- Consolidate cache tests: port unique tests from cleanup-cache-constants
  and cleanup-cache-refactored into cleanup-cache-if-needed, delete
  obsolete files
- Extract startup-delay tests into dedicated file
- Add setup/teardown and (require 'testutil-wttrin) to all test files
- Rename all 160 tests to follow
  test-&lt;module&gt;-&lt;category&gt;-&lt;scenario&gt;-&lt;expected-result&gt; convention
- Rename integration test file and add detailed docstrings
- Update Makefile glob to discover new integration test naming pattern

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>refactor: core: rename wttrin-mode-line-favorite-location to wttrin-favorite-location</title>
<updated>2025-11-13T20:14:45+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-13T20:14:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=bf989bb594680eb2e3b69f55752353aa33cb47bb'/>
<id>urn:sha1:bf989bb594680eb2e3b69f55752353aa33cb47bb</id>
<content type='text'>
Renamed variable to remove 'mode-line' prefix, making it usable for
future location-based features beyond mode-line display. Updated all
references in code, tests, and documentation. All 187 tests passing.
</content>
</entry>
<entry>
<title>refactor: Improve cache cleanup clarity and add input validation</title>
<updated>2025-11-08T19:20:18+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T19:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=b6761ed66012fcf3e98aa252582aaf03b2b85c12'/>
<id>urn:sha1:b6761ed66012fcf3e98aa252582aaf03b2b85c12</id>
<content type='text'>
Cache Refactorings:
- Extract wttrin--get-cache-entries-by-age helper function
- Refactor wttrin--cleanup-cache-if-needed to use helper
- Improves code clarity with descriptive variable names
- Makes cache logic independently testable
- Add 15 new tests (8 for helper, 7 for refactored cleanup)

Input Validation:
- Add range validation to wttrin-mode-line-startup-delay (1-10 seconds)
- Prevents invalid values (0, negative, or excessive delays)
- Uses restricted-sexp type for enforcement

Test Fixes:
- Fix debug function naming (use public wttrin-debug-clear-log)
- Ensure wttrin-debug module loads in test setup
- Make mocks synchronous for batch mode compatibility
- Update test expectations to match actual debug messages
- Fix startup delay test to check defcustom default value

Linter/Compiler Fixes:
- Add declare-function for wttrin--debug-log
- Add defvar/declare-function in wttrin-debug.el
- Fix docstring line lengths (wrap at 80 chars)
- Fix checkdoc warnings (imperative mood, escaping)
- Disambiguate temporary-file-directory reference

All 165 tests passing. Clean byte-compile, package-lint, checkdoc.
</content>
</entry>
<entry>
<title>refactor: make debug functions public (single hyphen naming)</title>
<updated>2025-11-08T18:12:52+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T18:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=04b11059b831c94b4e5ba901b735fcc888cbbe1a'/>
<id>urn:sha1:04b11059b831c94b4e5ba901b735fcc888cbbe1a</id>
<content type='text'>
Renamed private debug functions to public API:
- wttrin--debug-show-log → wttrin-debug-show-log
- wttrin--debug-clear-log → wttrin-debug-clear-log

Added ;;;###autoload to both functions for proper autoloading.

Updated all references:
- README.org (2 occurrences)
- tests/README-DEBUG-TESTS.md (4 occurrences)
- tests/test-wttrin-integration-with-debug.el (8 occurrences)

These are user-facing commands that should be discoverable via M-x,
so they follow the public API naming convention (single hyphen).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: debug: add comprehensive debug logging and integration tests</title>
<updated>2025-11-08T17:53:02+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T17:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=1f40ef408641680c951a65b72be240d9b7729d8e'/>
<id>urn:sha1:1f40ef408641680c951a65b72be240d9b7729d8e</id>
<content type='text'>
Enhanced wttrin-debug.el:
- Added wttrin--debug-log() function for timestamped logging
- Added wttrin--debug-clear-log() to clear log
- Added wttrin--debug-show-log() to display log in buffer
- Debug log structure: list of (timestamp . message) pairs

Added debug logging to key functions in wttrin.el:
- wttrin--fetch-url: Logs start, success (bytes), and errors
- wttrin--mode-line-fetch-weather: Logs start, URL, data received
- wttrin--mode-line-update-display: Logs display update, emoji extraction

Created comprehensive integration tests:
- test-wttrin-integration-with-debug.el (5 tests, 3 passing)
- Tests fetch, mode-line display, error handling with debug logging
- Includes mocked network calls to avoid external dependencies
- Example debug output shows complete flow:
  [wttrin-debug 11:51:46.490] mode-line-fetch: Starting fetch for Berkeley, CA
  [wttrin-debug 11:51:46.490] mode-line-fetch: Received data = "Berkeley, CA: ☀️ +62°F Clear"
  [wttrin-debug 11:51:46.490] mode-line-display: Extracted emoji = "☀", font = Noto Color Emoji
  [wttrin-debug 11:51:46.490] mode-line-display: Complete. mode-line-string set = YES

Added test fixtures:
- tests/fixtures/test-init.el: Minimal config with debug enabled
- tests/README-DEBUG-TESTS.md: Documentation for using debug features

Usage:
  (setq wttrin-debug t)  ; Before loading wttrin
  (require 'wttrin)
  M-x wttrin--debug-show-log  ; View all logged events

This provides complete visibility into wttrin's operation for troubleshooting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
