diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-23 23:16:03 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-23 23:16:03 -0400 |
| commit | e5aab199cd4c83f357ff5190139ddf2994ac28a3 (patch) | |
| tree | 0e7dbb511cc77a15ca1131b8ed9c988497ff4f1a /languages/elisp/claude/hooks/validate-el.sh | |
| parent | 24ca58d764dbcc2bad57a914a10e9e9b89a3f66e (diff) | |
| download | rulesets-e5aab199cd4c83f357ff5190139ddf2994ac28a3.tar.gz rulesets-e5aab199cd4c83f357ff5190139ddf2994ac28a3.zip | |
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
Diffstat (limited to 'languages/elisp/claude/hooks/validate-el.sh')
| -rwxr-xr-x | languages/elisp/claude/hooks/validate-el.sh | 1 |
1 files changed, 1 insertions, 0 deletions
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); |
