aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-03 19:44:05 -0500
committerCraig Jennings <c@cjennings.net>2026-05-03 19:44:05 -0500
commit431eca805355e017da96d18fbebdbe37dc28d0f4 (patch)
tree646def5ec671667e7bb573568de22b63ae0c978a /Makefile
parent800d1413a6feb32d2fa1f51f8cac9e447bdec7ce (diff)
downloaddotemacs-431eca805355e017da96d18fbebdbe37dc28d0f4.tar.gz
dotemacs-431eca805355e017da96d18fbebdbe37dc28d0f4.zip
fix: shell-quote F6 test-runner command arguments
`cj/--f6-test-runner-cmd-for` was building shell command strings with raw paths and stems via `format`. For ordinary names (`tests/test_foo.py`, `pkg/foo`) that worked fine. But a path with spaces or a stem with shell metacharacters would break or misbehave once the string hit `compile`. A Python test file under `dir with spaces/` would get tokenized as separate arguments. I added `cj/--f6-shell-quote-argument` that escapes only when the argument doesn't match `cj/--f6-shell-safe-argument-regexp` (alphanumerics, slash, dot, dash, plus a small handful of safe punctuation). Ordinary paths skip the quoter and stay readable. Risky paths route through `shell-quote-argument`. I wrapped the four interpolations in the test-runner builder: the elisp `FILE=` basename, the elisp `TEST=^test-stem-` regex, both pytest paths, and the Go `./rel-dir`. The Go branch also handles an empty rel-dir explicitly so the result stays `go test ./` instead of constructing `./` via format with an empty string. I added three boundary tests: a Python path with spaces, an elisp stem with `;`, and a Go directory with spaces. Existing tests for ordinary paths continue to pass since the safe regex covers them.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions