From e5aab199cd4c83f357ff5190139ddf2994ac28a3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 23 Jun 2026 23:16:03 -0400 Subject: fix(elisp): cd to tests/ before the Phase 2 test load Phase 2's plain `-l` load ran emacs from PROJECT_ROOT, so test files that resolve test-bootstrap.el with `(expand-file-name "test-bootstrap.el")` against default-directory couldn't find it and failed with "Cannot open load file". Phase 1 escaped this because byte-compile-file rebinds default-directory to the source file's dir. The cd restores the tests/ working directory the tests/Makefile already runs from. Restores b2e9038, dropped when a consuming project's .claude refreshed to the rulesets canonical, which never carried the fix. Claude-Session: https://claude.ai/code/session_017PtX1nt1rtYVATuzmzBS4f --- languages/elisp/claude/hooks/validate-el.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'languages/elisp/claude/hooks') diff --git a/languages/elisp/claude/hooks/validate-el.sh b/languages/elisp/claude/hooks/validate-el.sh index 2529fcc..8e46457 100755 --- a/languages/elisp/claude/hooks/validate-el.sh +++ b/languages/elisp/claude/hooks/validate-el.sh @@ -104,6 +104,7 @@ if [ "$count" -ge 1 ] && [ "$count" -le "$MAX_AUTO_TEST_FILES" ]; then -L "$PROJECT_ROOT/tests" \ -L "$PROJECT_ROOT/themes" \ --eval '(package-initialize)' \ + --eval "(cd \"$PROJECT_ROOT/tests\")" \ -l ert "${load_args[@]}" \ --eval "(ert-run-tests-batch-and-exit '(not (tag :slow)))" 2>&1)"; then # Terminal gets a compact summary (the run tally + the failing test names); -- cgit v1.2.3