Test against init.el with all module flags enabled

Detect module flags by walking package.el files.

This still does not build all dependencies, because some are enabled
only if some flag or other module is disabled. But this should be close.
This commit is contained in:
Marien Zwart 2024-05-26 17:20:24 +10:00
parent 78ad78072d
commit f48edf8b34
No known key found for this signature in database
3 changed files with 46 additions and 6 deletions

View file

@ -37,7 +37,8 @@ let
mkDoom = args: (makeDoomPackages (common // args)).doomEmacs;
mkDoomDir = args: writeTextDir "init.el" (toInit args);
minimalDoomDir = mkDoomDir { config = [ "default" ]; };
fullDoomDir = (makeDoomPackages (common // { doomDir = emptyDirectory; })).doomDirWithAllModules;
allModsDoomDir = (makeDoomPackages (common // { doomDir = emptyDirectory; })).doomDirWithAllModules;
allFlagsDoomDir = (makeDoomPackages (common // { doomDir = emptyDirectory; })).doomDirWithAllModulesAndFlags;
doomTest = name: init: doomArgs: testers.testEqualContents {
assertion = "name = ${name}; modules = ${toPretty {} init}; args = ${toPretty {} doomArgs};";
expected = writeText "doom-expected" "Doom functions";
@ -66,7 +67,8 @@ in {
minimalEmacs = (makeDoomPackages (common // {
doomDir = minimalDoomDir;
})).emacsWithDoom;
full = mkDoom { doomDir = fullDoomDir; };
allModules = mkDoom { doomDir = allModsDoomDir; };
allModulesAndFlags = mkDoom { doomDir = allFlagsDoomDir; };
example = mkDoom { doomDir = ./doomdirs/example; };
example-without-loader = mkDoom {
doomDir = ./doomdirs/example;