jorgenschaefer / emacs-buttercup

Behavior-Driven Emacs Lisp Testing
GNU General Public License v3.0
360 stars 44 forks source link

Use an absolute path for the root of test files #204

Closed akirak closed 2 years ago

akirak commented 3 years ago

When I ran buttercup-run-discover, I encountered the following error:

Cannot open load file: No such file or directory, ./org-multi-wiki-tests.el

It seems that load function sometimes (?) fails to load a file starting with ./. For example, it fails when I run buttercup-run-discover . from the command line, while it succeeds when running buttercup-run-discover $PWD. I find it strange, but it would be safer to use default-directory.

snogge commented 3 years ago

Can you explain a bit more about this? What was the command line you were using, and what is the file structure of your project?

akirak commented 3 years ago

I ran the following command inside the repository of org-multi-wiki:

emacs -Q --batch -l buttercup -f buttercup-run-discover

and received the following message:

Cannot open load file: No such file or directory, ./org-multi-wiki-tests.el

On the contrary, I didn't get the error when I ran the following command:

emacs -Q --batch -l buttercup -f buttercup-run-discover /home/akirakomamura/.config/emacs/straight/repos/org-multi-wiki
akirak commented 3 years ago

I ran pwd; ls before the command and apparently the file exists in the directory:

/home/akirakomamura/.config/emacs/straight/repos/org-multi-wiki LICENSE README.org helm-org-multi-wiki.el notes.org org-multi-wiki-tests.el org-multi-wiki.el screenshots

akirak commented 2 years ago

This seems to be irrelevant, so I will close it for now.