lib/tests: Add tests for recursive disabledModules
This commit is contained in:
parent
7167985e34
commit
b89b23b6b2
|
@ -182,6 +182,12 @@ checkConfigOutput "true" config.submodule.outer ./declare-submoduleWith-modules.
|
|||
## Paths should be allowed as values and work as expected
|
||||
checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix
|
||||
|
||||
# Check that disabledModules works recursively and correctly
|
||||
checkConfigOutput "true" config.enable ./disable-recursive/main.nix
|
||||
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-foo.nix}
|
||||
checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-bar.nix}
|
||||
checkConfigError 'The option .* defined in .* does not exist' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix}
|
||||
|
||||
cat <<EOF
|
||||
====== module tests ======
|
||||
$pass Pass
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
../declare-enable.nix
|
||||
];
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
|
||||
disabledModules = [
|
||||
./bar.nix
|
||||
];
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
|
||||
disabledModules = [
|
||||
./foo.nix
|
||||
];
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
../declare-enable.nix
|
||||
];
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./foo.nix
|
||||
./bar.nix
|
||||
];
|
||||
|
||||
enable = true;
|
||||
}
|
Loading…
Reference in New Issue