Tweak toInit input structure
Using an attrset instead of a list allows using Nix's shorthand for nested attrsets, which is much more readable for the simple cases toInit is used for.
This commit is contained in:
parent
c61cd622b7
commit
f8012b8785
2 changed files with 19 additions and 13 deletions
14
checks.nix
14
checks.nix
|
|
@ -37,7 +37,7 @@ let
|
|||
};
|
||||
mkDoom = args: (makeDoomPackages (common // args)).doomEmacs;
|
||||
mkDoomDir = args: writeTextDir "init.el" (toInit args);
|
||||
minimalDoomDir = mkDoomDir { config = [ "default" ]; };
|
||||
minimalDoomDir = mkDoomDir { config.default = true; };
|
||||
doomTest = name: init: doomArgs: testers.testEqualContents {
|
||||
assertion = "name = ${name}; modules = ${toPretty {} init}; args = ${toPretty {} doomArgs};";
|
||||
expected = writeText "doom-expected" "Doom functions";
|
||||
|
|
@ -77,14 +77,14 @@ in {
|
|||
doomDir = ./doomdir;
|
||||
profileName = "";
|
||||
};
|
||||
interactive = doomTest "nix-profile" { config = [ "default" ]; } { };
|
||||
interactive-without-loader = doomTest "no-profile" { config = [ "default" ]; } { profileName = ""; };
|
||||
interactive-no-profile-hack = doomTest "no-profile" { config = [ "default" ]; } { noProfileHack = true; };
|
||||
interactive = doomTest "nix-profile" { config.default = true; } { };
|
||||
interactive-without-loader = doomTest "no-profile" { config.default = true; } { profileName = ""; };
|
||||
interactive-no-profile-hack = doomTest "no-profile" { config.default = true; } { noProfileHack = true; };
|
||||
|
||||
org-re-reveal = doomTest "org-re-reveal" { lang = [ [ "org" "+present" ] ]; } { };
|
||||
org-re-reveal = doomTest "org-re-reveal" { lang.org = [ "+present" ]; } { };
|
||||
|
||||
# Various tests of module combinations.
|
||||
unpinned-org = doomTest "external-org" { app = [ [ "rss" "+org" ] ]; } { };
|
||||
unpinned-org = doomTest "external-org" { app.rss = [ "+org" ]; } { };
|
||||
|
||||
extraPackages = doomTest "extraPackages" { config = [ "default" ]; } { extraPackages = epkgs: [ epkgs.vterm ]; };
|
||||
extraPackages = doomTest "extraPackages" { config.default = true; } { extraPackages = epkgs: [ epkgs.vterm ]; };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue