2024-02-15 14:27:45 +01:00
|
|
|
{ self, ... }:
|
2023-12-06 13:09:26 +01:00
|
|
|
{
|
|
|
|
perSystem =
|
2024-05-05 19:39:35 +02:00
|
|
|
{
|
2023-12-06 13:09:26 +01:00
|
|
|
pkgs,
|
tests/test-derivation: allow tests to be modules
Use `mkTestDerivationFromNixvimModule` instead of `mkTestDerivation`,
allowing "proper" modules to be used instead of plain attr configs.
This is useful for more complex tests that wish to use `config` or
`options` arguments, e.g:
```nix
{config, options, ...}: {
/* some cool test */
}
```
To allow `tests.dontRun` to be defined on such a test, the module is
allowed to be nested as `module`, e.g:
```nix
{
tests.dontRun = true;
module = {config, options, ...}: {
/* a disabled test */
};
}
```
Also ended up doing some general cleanup, removing an unused function,
etc.
2024-06-29 20:16:16 +01:00
|
|
|
pkgsUnfree,
|
2024-01-06 17:53:31 +01:00
|
|
|
system,
|
2024-02-09 15:03:32 +01:00
|
|
|
helpers,
|
2023-12-06 13:09:26 +01:00
|
|
|
makeNixvimWithModule,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
2024-01-06 17:57:24 +01:00
|
|
|
checks = {
|
|
|
|
tests = import ../tests {
|
tests/test-derivation: allow tests to be modules
Use `mkTestDerivationFromNixvimModule` instead of `mkTestDerivation`,
allowing "proper" modules to be used instead of plain attr configs.
This is useful for more complex tests that wish to use `config` or
`options` arguments, e.g:
```nix
{config, options, ...}: {
/* some cool test */
}
```
To allow `tests.dontRun` to be defined on such a test, the module is
allowed to be nested as `module`, e.g:
```nix
{
tests.dontRun = true;
module = {config, options, ...}: {
/* a disabled test */
};
}
```
Also ended up doing some general cleanup, removing an unused function,
etc.
2024-06-29 20:16:16 +01:00
|
|
|
inherit
|
|
|
|
pkgs
|
|
|
|
pkgsUnfree
|
|
|
|
helpers
|
|
|
|
makeNixvimWithModule
|
|
|
|
;
|
2024-01-06 17:57:24 +01:00
|
|
|
};
|
2024-01-06 17:31:17 +01:00
|
|
|
|
2024-01-06 17:57:24 +01:00
|
|
|
extra-args-tests = import ../tests/extra-args.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
inherit makeNixvimWithModule;
|
|
|
|
};
|
2024-01-06 17:53:31 +01:00
|
|
|
|
2024-02-22 08:22:21 +01:00
|
|
|
extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };
|
|
|
|
|
2024-07-07 16:31:40 +01:00
|
|
|
extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; };
|
|
|
|
|
2024-02-15 14:27:45 +01:00
|
|
|
enable-except-in-tests = import ../tests/enable-except-in-tests.nix {
|
|
|
|
inherit pkgs makeNixvimWithModule;
|
|
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
|
|
|
|
};
|
|
|
|
|
2024-02-15 22:51:26 +01:00
|
|
|
no-flake = import ../tests/no-flake.nix {
|
|
|
|
inherit system;
|
|
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
|
|
|
|
nixvim = "${self}";
|
|
|
|
};
|
|
|
|
|
2024-01-06 17:57:24 +01:00
|
|
|
lib-tests = import ../tests/lib-tests.nix {
|
2024-02-09 15:03:32 +01:00
|
|
|
inherit pkgs helpers;
|
2024-01-06 17:57:24 +01:00
|
|
|
inherit (pkgs) lib;
|
2024-05-05 19:39:35 +02:00
|
|
|
};
|
2024-01-06 17:53:31 +01:00
|
|
|
};
|
2024-01-06 17:57:24 +01:00
|
|
|
};
|
2023-12-06 13:09:26 +01:00
|
|
|
}
|