Add tests for the new module system improvements.
This commit is contained in:
8
lib/tests/modules/custom-arg-define-enable.nix
Normal file
8
lib/tests/modules/custom-arg-define-enable.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ lib, custom, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
_module.args.custom = true;
|
||||
enable = custom;
|
||||
};
|
||||
}
|
||||
5
lib/tests/modules/define-if-loaOfSub-foo-enable.nix
Normal file
5
lib/tests/modules/define-if-loaOfSub-foo-enable.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.enable {
|
||||
loaOfSub.foo.enable = true;
|
||||
}
|
||||
5
lib/tests/modules/define-loaOfSub-foo-enable-if.nix
Normal file
5
lib/tests/modules/define-loaOfSub-foo-enable-if.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
loaOfSub.foo.enable = lib.mkIf config.enable true;
|
||||
}
|
||||
7
lib/tests/modules/define-loaOfSub-foo-if-enable.nix
Normal file
7
lib/tests/modules/define-loaOfSub-foo-if-enable.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
loaOfSub.foo = lib.mkIf config.enable {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
7
lib/tests/modules/define-loaOfSub-if-foo-enable.nix
Normal file
7
lib/tests/modules/define-loaOfSub-if-foo-enable.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
loaOfSub = lib.mkIf config.enable {
|
||||
foo.enable = true;
|
||||
};
|
||||
}
|
||||
3
lib/tests/modules/define-module-check.nix
Normal file
3
lib/tests/modules/define-module-check.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
_module.check = false;
|
||||
}
|
||||
Reference in New Issue
Block a user