From 474a9bed31c583761e55b6072f07fcfd6d095471 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 26 Aug 2026 12:25:39 -0600 Subject: test: repair the seven files red under Emacs 31.1 None of the seven was a config regression. Each file had its own cause: - config-utilities: the tests mocked fboundp with cl-letf. fset on a subr autoloads comp-run, which requires bytecomp, whose defun of byte-compile-file replaced the mock installed earlier in the same cl-letf. 30.2 hid it because ert happened to load bytecomp first. I extracted cj/--compile-elisp-file with an injectable availability predicate (fboundp by default), made cj/compile-this-elisp-buffer the wrapper, and had the tests inject a predicate instead of redefining a primitive. Added the missing no-compiler case. - system-defaults-functions: the file let-bound use-package-always-ensure before anything declared it special. 30.2 downgraded that to a "Failed to parse package recentf" warning; 31.1 moves the defcustom to autoload time, where it is fatal at load. One defvar before the let. - calibredb-epub-config: the jump tests stubbed calibredb while it was still an autoload, so the module's require loaded the real definition over the stub and the real command always ran. Require calibredb before any stub. - agenda-query--render: org 9.8.7 parses the priority cookie with (looking-at org-priority-regexp), whose lazy prefix swallows everything between the stars and the cookie. The fixture now has no cookie and pins that the keyword is not recognised. - prog-general-yas-activation: python-ts-mode prompts to install a missing grammar, which a batch run cannot answer. The test skips on treesit-ready-p rather than on the mode existing, and the module comment says why. - integration-recurring-events: the fixtures are America/Chicago and the assertions expect Chicago rendering, so the file only passed on a machine in Central time. TZ is pinned in setup and restored in teardown. The integration failure had been invisible since 08-17 because make test stops after a red unit phase. make test exits 0 again for the first time since then. --- tests/test-agenda-query--render.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/test-agenda-query--render.el') diff --git a/tests/test-agenda-query--render.el b/tests/test-agenda-query--render.el index 48d28773..da5c3f60 100644 --- a/tests/test-agenda-query--render.el +++ b/tests/test-agenda-query--render.el @@ -162,10 +162,17 @@ still parses as JSON, which is the worst kind." Pinning the failure mode, not endorsing it. This is what the surface showed before the batch writer learned the vocabulary, and it is why the test above exists." + ;; No priority cookie in this fixture. org 9.8 (Emacs 31.1) parses the + ;; cookie with `org-priority-regexp' under `looking-at', and that regexp's + ;; lazy `.*?' prefix swallows everything between the stars and the cookie, + ;; unknown keyword included. A cookie here would test org's bug rather than + ;; the vocabulary gap this test pins. (let ((org-todo-keywords '((sequence "TODO" "|" "DONE")))) (test-aq-render--with-agenda-file - "* DOING [#A] Justin Johns advisor projects\nSCHEDULED: <2026-07-31 Fri 09:00>\n" - (should (string-prefix-p "DOING" (alist-get 't (car rows))))))) + "* DOING Justin Johns advisor projects\nSCHEDULED: <2026-07-31 Fri 09:00>\n" + (let ((row (car rows))) + (should (string-prefix-p "DOING" (alist-get 't row))) + (should-not (equal "DOING" (alist-get 'keyword row))))))) ;;; ---------- the cache writer ---------- -- cgit v1.2.3