mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
tests: set _file
to avoid <unknown-file>
messages
Since the module system is importing an anonymous fnOrAttr module, instead of a `path` type module, it doesn't have enough context to figure out the module's file automatically.
This commit is contained in:
parent
ce4c3a72c1
commit
810eacf516
1 changed files with 17 additions and 6 deletions
|
@ -10,9 +10,13 @@ let
|
|||
inherit (test-derivation) mkTestDerivationFromNixvimModule;
|
||||
|
||||
moduleToTest =
|
||||
name: module:
|
||||
file: name: module:
|
||||
mkTestDerivationFromNixvimModule {
|
||||
inherit name module;
|
||||
inherit name;
|
||||
module = {
|
||||
_file = file;
|
||||
imports = [ module ];
|
||||
};
|
||||
pkgs = pkgsUnfree;
|
||||
};
|
||||
|
||||
|
@ -39,10 +43,17 @@ let
|
|||
in
|
||||
# We attempt to build & execute all configurations
|
||||
lib.pipe (testFiles ++ [ exampleFiles ]) [
|
||||
(builtins.map (file: {
|
||||
inherit (file) name;
|
||||
path = pkgs.linkFarm file.name (builtins.mapAttrs moduleToTest file.cases);
|
||||
}))
|
||||
(builtins.map (
|
||||
{
|
||||
name,
|
||||
file,
|
||||
cases,
|
||||
}:
|
||||
{
|
||||
inherit name;
|
||||
path = pkgs.linkFarm name (builtins.mapAttrs (moduleToTest file) cases);
|
||||
}
|
||||
))
|
||||
(helpers.groupListBySize 10)
|
||||
(lib.imap1 (
|
||||
i: group: rec {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue