mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +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;
|
inherit (test-derivation) mkTestDerivationFromNixvimModule;
|
||||||
|
|
||||||
moduleToTest =
|
moduleToTest =
|
||||||
name: module:
|
file: name: module:
|
||||||
mkTestDerivationFromNixvimModule {
|
mkTestDerivationFromNixvimModule {
|
||||||
inherit name module;
|
inherit name;
|
||||||
|
module = {
|
||||||
|
_file = file;
|
||||||
|
imports = [ module ];
|
||||||
|
};
|
||||||
pkgs = pkgsUnfree;
|
pkgs = pkgsUnfree;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,10 +43,17 @@ let
|
||||||
in
|
in
|
||||||
# We attempt to build & execute all configurations
|
# We attempt to build & execute all configurations
|
||||||
lib.pipe (testFiles ++ [ exampleFiles ]) [
|
lib.pipe (testFiles ++ [ exampleFiles ]) [
|
||||||
(builtins.map (file: {
|
(builtins.map (
|
||||||
inherit (file) name;
|
{
|
||||||
path = pkgs.linkFarm file.name (builtins.mapAttrs moduleToTest file.cases);
|
name,
|
||||||
}))
|
file,
|
||||||
|
cases,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
inherit name;
|
||||||
|
path = pkgs.linkFarm name (builtins.mapAttrs (moduleToTest file) cases);
|
||||||
|
}
|
||||||
|
))
|
||||||
(helpers.groupListBySize 10)
|
(helpers.groupListBySize 10)
|
||||||
(lib.imap1 (
|
(lib.imap1 (
|
||||||
i: group: rec {
|
i: group: rec {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue