-
I have a package that has some initialization-time stuff that needs to be handled carefully. What I’ve done is split up my tests so I have the standard library tests, and then a number of separate test files that are each intended to be run in a fresh Emacs instance, so I can make sure different user init styles all work correctly. What I first tried with Eldev is ;; in Eldev
(setf eldev-test-fileset `(:and ,eldev-test-fileset (:not "./tests/initialization"))) # test the standard library functionality
eldev test
# run each initialization test on its own
init_tests=($(IFS=$'\n' find ./tests/initialization -type f -name '*.el'))
for file in "''${init_tests[@]}"; do
eldev test -f "$file"
done But, since the initialization tests aren’t in the test fileset, However, if I leave them in the fileset, then
I’m just curious how I should approach this. I feel like I’m probably overlooking or misunderstanding something about filesets, but I couldn’t find anything relevant in the manual. How would you go about handling this situation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You could maybe base on a somewhat-similar separation in Eldev's own file I have tests that are self-contained (use only Eldev itself) and tests that depend on external projects, e.g. Buttercup or Relint. The latter I call "integration tests"; you can just search the file for "integration". The two added commands are actually only sugarcoating, the important thing are the fileset definitions and the test selection option. This doesn't include "one test per Emacs instance" of course, but as I have understood, you figured out that part yourself. |
Beta Was this translation helpful? Give feedback.
You could maybe base on a somewhat-similar separation in Eldev's own file
Eldev
.I have tests that are self-contained (use only Eldev itself) and tests that depend on external projects, e.g. Buttercup or Relint. The latter I call "integration tests"; you can just search the file for "integration". The two added commands are actually only sugarcoating, the important thing are the fileset definitions and the test selection option.
This doesn't include "one test per Emacs instance" of course, but as I have understood, you figured out that part yourself.