Function: projectile--test-name-for-impl-name
projectile--test-name-for-impl-name is a byte-compiled function
defined in projectile.el.
Signature
(projectile--test-name-for-impl-name IMPL-FILE-PATH)
Documentation
Determine the name of the test file for IMPL-FILE-PATH.
IMPL-FILE-PATH may be an absolute path, relative path or a file name.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile--test-name-for-impl-name (impl-file-path)
"Determine the name of the test file for IMPL-FILE-PATH.
IMPL-FILE-PATH may be an absolute path, relative path or a file name."
(let* ((project-type (projectile-project-type))
(impl-file-name (file-name-sans-extension (file-name-nondirectory impl-file-path)))
(impl-file-ext (file-name-extension impl-file-path))
(test-prefix (funcall projectile-test-prefix-function project-type))
(test-suffix (funcall projectile-test-suffix-function project-type)))
(cond
(test-prefix (concat test-prefix impl-file-name "." impl-file-ext))
(test-suffix (concat impl-file-name test-suffix "." impl-file-ext))
(t (error "Cannot determine a test file name, one of \"test-suffix\" or \"test-prefix\" must be set for project type `%s'" project-type)))))