nix-community.nixvim/flake-modules/tests.nix
Matt Sturgeon e48da949cf
tests/package-options: init
The test ensures "package" options use a "literalExpression" in their
defaultText; i.e. it validates `lib.mkPackageOption` was used to build
the package options.

All options whose `default` is a derivation are covered by the test,
other than submodule sub-options.
2024-09-05 02:24:52 +01:00

53 lines
1.5 KiB
Nix

{ self, ... }:
{
perSystem =
{
pkgs,
pkgsUnfree,
system,
helpers,
makeNixvimWithModule,
...
}:
let
evaluatedNixvim = helpers.modules.evalNixvim { check = false; };
in
{
checks = {
extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};
extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };
extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; };
enable-except-in-tests = import ../tests/enable-except-in-tests.nix {
inherit pkgs makeNixvimWithModule;
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
};
failing-tests = pkgs.callPackage ../tests/failing-tests.nix {
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
};
no-flake = import ../tests/no-flake.nix {
inherit system;
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
nixvim = "${self}";
};
lib-tests = import ../tests/lib-tests.nix {
inherit pkgs helpers;
inherit (pkgs) lib;
};
maintainers = import ../tests/maintainers.nix { inherit pkgs; };
generated = pkgs.callPackage ../tests/generated.nix { };
package-options = pkgs.callPackage ../tests/package-options.nix { inherit evaluatedNixvim; };
} // import ../tests { inherit pkgs pkgsUnfree helpers; };
};
}