aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dev-fkeys--f6-current-file-tests-impl.el4
-rw-r--r--tests/test-dev-fkeys--f6-test-runner-cmd-for.el12
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/test-dev-fkeys--f6-current-file-tests-impl.el b/tests/test-dev-fkeys--f6-current-file-tests-impl.el
index ecc7a4f4..318a78db 100644
--- a/tests/test-dev-fkeys--f6-current-file-tests-impl.el
+++ b/tests/test-dev-fkeys--f6-current-file-tests-impl.el
@@ -45,7 +45,7 @@ Components integrated:
(cj/--f6-current-file-tests-impl
"/home/u/proj/tests/test-foo.el"
"/home/u/proj/")
- (should (string= seen-cmd "make test-file FILE=tests/test-foo.el")))))
+ (should (string= seen-cmd "make test-file FILE=test-foo.el")))))
(ert-deftest test-dev-fkeys-f6-current-file-tests-impl-python-source ()
"Normal: a Python source file maps to `pytest tests/test_<stem>.py'."
@@ -88,7 +88,7 @@ just that file's tests run, not the whole module's prefix."
(cj/--f6-current-file-tests-impl
"/home/u/proj/tests/test-foo--bar.el"
"/home/u/proj/")
- (should (string= seen-cmd "make test-file FILE=tests/test-foo--bar.el")))))
+ (should (string= seen-cmd "make test-file FILE=test-foo--bar.el")))))
;;; Error Cases
diff --git a/tests/test-dev-fkeys--f6-test-runner-cmd-for.el b/tests/test-dev-fkeys--f6-test-runner-cmd-for.el
index d9f8f464..cb242889 100644
--- a/tests/test-dev-fkeys--f6-test-runner-cmd-for.el
+++ b/tests/test-dev-fkeys--f6-test-runner-cmd-for.el
@@ -24,11 +24,14 @@
;;; Normal Cases — Elisp
(ert-deftest test-dev-fkeys-f6-cmd-for-elisp-test-file ()
- "Normal: an elisp test file runs via `make test-file FILE=<path>'."
+ "Normal: an elisp test file runs via `make test-file FILE=<basename>'.
+The project Makefile prepends `tests/' to whatever FILE you pass, so the
+runner command must use just the basename (not the rel-path) to avoid
+`tests/tests/...' double-prefix."
(should (string=
(cj/--f6-test-runner-cmd-for
'elisp t "tests/test-foo.el" "foo" "tests")
- "make test-file FILE=tests/test-foo.el")))
+ "make test-file FILE=test-foo.el")))
(ert-deftest test-dev-fkeys-f6-cmd-for-elisp-source-file ()
"Normal: an elisp source file runs via `make test-name TEST=^test-<stem>-'.
@@ -78,11 +81,12 @@ test files."
(ert-deftest test-dev-fkeys-f6-cmd-for-elisp-test-file-with-double-dash ()
"Boundary: a per-helper test file runs only that file, not the whole
test-name prefix. `make test-file FILE=...' is precise; `test-name'
-would over-match."
+would over-match. Pass just the basename — the Makefile re-prepends
+`tests/' itself."
(should (string=
(cj/--f6-test-runner-cmd-for
'elisp t "tests/test-foo--bar.el" "foo" "tests")
- "make test-file FILE=tests/test-foo--bar.el")))
+ "make test-file FILE=test-foo--bar.el")))
(ert-deftest test-dev-fkeys-f6-cmd-for-go-source-at-root ()
"Boundary: a Go source file at project root runs `go test ./'."