aboutsummaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* test: cover wttrin-debug.el and expand lint to all source filesCraig Jennings2026-05-051-16/+23
| | | | | | | | | | | | I added 24 unit tests across six new files for wttrin-debug.el. They cover enable/disable, the debug-log writer, clear-log, show-log, and the mode-line diagnostic dump. That lifts wttrin-debug.el coverage from 27% to 95%, and overall coverage from 84% to 94%. Each function gets Normal / Boundary / Error categories where applicable. Globals like `wttrin-debug` and `wttrin--debug-log` are isolated per test with let-bindings. The dynamic-scope rebinding restores state cleanly at exit. I expanded the `lint` target to run on all three source files instead of just `wttrin.el`. Checkdoc and elisp-lint run on every file. Package-lint stays scoped to `wttrin.el` because the others aren't standalone packages. The tricky bit: `elisp-lint-file` re-runs package-lint internally as one of its validators. So the explicit guard alone wasn't enough. The fix binds `elisp-lint-ignored-validators` to include "package-lint" for the secondaries, which suppresses the re-run at the validator level. I also added `*-autoloads.el` to .gitignore. Eask generates `emacs-wttrin-autoloads.el` during install, and it shouldn't be tracked. I skipped one function: `wttrin--debug-mode-line-info` is a one-line dispatcher to `debug-wttrin-mode-line`. Testing it would assert the dispatch happened, which only tests Emacs.
* build: switch Makefile to eask, wire up undercover coverageCraig Jennings2026-05-051-79/+134
| | | | | | | | | | I wanted a coverage number, so I added an Eask file declaring the runtime dep (xterm-color) plus three dev deps (undercover, package-lint, elisp-lint). The Makefile now runs every test and lint recipe through `eask emacs`. That drops the hand-rolled `(require 'package)` + `add-to-list 'package-archives` boilerplate that was duplicated across six recipes. I added a `make deps` target that runs `eask install-deps --dev`. I also added a `make coverage` target that loads `tests/run-coverage-file.el` before each unit-test file. Undercover instruments the three source files first, then the test loads pick up the instrumented copy. Per-file results merge into `.coverage/simplecov.json` in simplecov format. I expanded `validate-parens` and `compile` to cover all three source files instead of just `wttrin.el`. Lint stays scoped to the main file for now. Coverage right now is 84% overall: wttrin.el 92%, wttrin-geolocation.el 100%, wttrin-debug.el 27%. The debug module is low because only the integration test exercises it. The coverage loop runs unit tests only.
* refactor: tests: standardize naming, consolidate files, and expand testutilCraig Jennings2026-02-171-1/+1
| | | | | | | | | | | | | | | | | - 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-<module>-<category>-<scenario>-<expected-result> 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 <noreply@anthropic.com>
* feat: makefile: add smoke test target and standardize output symbolsCraig Jennings2025-11-081-24/+45
| | | | | | | | | | | | | | | | | | | | | | | | Smoke Test Target: - Add SMOKE_TESTS variable matching test-*-smoke.el pattern - Create test-smoke target that runs before unit/integration tests - Implement fail-fast behavior: smoke test failures stop further execution - Update test execution order: smoke → unit → integration (testing pyramid) - Fix INTEGRATION_TESTS pattern to match test-*-integration-*.el - Update help text with correct test counts for each category Symbol Standardization: - Replace Unicode symbols with bracketed ASCII for better portability - ✓ → [✓] (success/completion) - ✗ → [✗] (error/failure) - ⚠ → [!] (warning/attention) - Apply to all targets: test, validate, compile, lint, install-deps, clean - No color codes (were never present) - Benefits: works in all terminals, easier to grep/parse Test organization now: - 1 smoke test file (package sanity checks - runs first) - 16 unit test files (function behavior) - 1 integration test file (component interactions)
* feat(emacs): Add asynchronous weather fetching to wttrinCraig Jennings2025-11-041-2/+10
| | | | | | | | | | | | | | | | | | Introduce asynchronous data fetching to the wttrin.el Emacs package. This enhancement avoids blocking Emacs during data retrieval by using `url-retrieve` for async calls. The behavior is controlled via a new customizable variable `wttrin-use-async`. Tests have been added for the new async behavior to ensure proper functionality.feat:makefile): Add package initialization for Emacs batch Enhance Makefile with package support by loading and initializing MELPA archive before validating and compiling, ensuring required packages are available during these operations. feat(tests): Add unit tests for `wttrin--display-weather` Introduce comprehensive tests for `wttrin--display-weather` function to validate buffer creation, content, keybindings, and error handling.
* feat:Makefile: Add dependency installation targetCraig Jennings2025-11-041-2/+23
| | | | | | | Add a new `install-deps` target to the Makefile for setting up required dependencies, specifically `xterm-color`, using MELPA package repository. Enhance test process by including package initialization in `EMACS_TEST` command.
* remove coloring from the MakefileCraig Jennings2025-11-041-42/+35
|
* feat:Makefile: Add Makefile for build and test automationCraig Jennings2025-11-041-0/+218
Introduce a Makefile to automate common tasks for the wttrin project. This includes running tests (unit and integration), validating and compiling the main file, linting, and cleaning up generated files.