aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/test-runner.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/test-runner.el b/modules/test-runner.el
index e05145e4..7f157f1c 100644
--- a/modules/test-runner.el
+++ b/modules/test-runner.el
@@ -239,7 +239,10 @@ Returns: \\='success if added successfully,
Second value is the relative filename if successful."
(cond
((null filepath) (cons 'no-file nil))
- ((not (string-prefix-p (file-truename testdir) (file-truename filepath)))
+ ;; Route through the helper: it appends the trailing slash, so a sibling
+ ;; sharing the directory's name prefix (tests-old/ against tests/) is
+ ;; rejected. A bare `string-prefix-p' on the truenames accepts it.
+ ((not (cj/test--file-in-directory-p filepath testdir))
(cons 'not-in-testdir nil))
(t
(let ((relative (file-relative-name filepath testdir)))