mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
plugins/gitgutter: add tests
This commit is contained in:
parent
b6d96387d1
commit
3325dcb00b
1 changed files with 41 additions and 0 deletions
41
tests/test-sources/plugins/git/gitgutter.nix
Normal file
41
tests/test-sources/plugins/git/gitgutter.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.gitgutter.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
grep-command =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
plugins.gitgutter = {
|
||||||
|
enable = true;
|
||||||
|
grep = {
|
||||||
|
package = pkgs.gnugrep;
|
||||||
|
command = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion =
|
||||||
|
config.extraPackages != [ ] && lib.any (x: x.pname or null == "gnugrep") config.extraPackages;
|
||||||
|
message = "gnugrep wasn't found when it was expected";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
no-packages =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
globals.gitgutter_git_executable = lib.getExe pkgs.git;
|
||||||
|
plugins.gitgutter = {
|
||||||
|
enable = true;
|
||||||
|
gitPackage = null;
|
||||||
|
};
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = lib.all (x: x.pname or null != "git") config.extraPackages;
|
||||||
|
message = "A git package found in extraPackages when it wasn't expected";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue