Suppose your project's main file is called foo.el and the tests are in test/foo.el. Currently, undercover will erroneously instrument the test file too, because it matches by filename, ignoring the path. I know this is not the standard setup, but this patch makes undercover work with it too, at zero cost.
Hmm, I don't see anything in the documentation of file-name-handler-alist that mentions whether the matched names will be absolute or not, but that does seem to be the case in practice.
Rationale:
foo.el
and the tests are intest/foo.el
. Currently,undercover
will erroneously instrument the test file too, because it matches by filename, ignoring the path. I know this is not the standard setup, but this patch makesundercover
work with it too, at zero cost.