about summary refs log tree commit diff
path: root/lib/tests/modules.sh
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2023-07-25 01:53:30 +0200
committersternenseemann <sternenseemann@systemli.org>2023-07-26 23:58:04 +0200
commit9c35f44999b38f07b674ff25cde17452ab4a1969 (patch)
treefbe8576b5fd723e2993e755e6cc820b0875c7f62 /lib/tests/modules.sh
parent8ef139fe5251dd94b2464e8a21388deadd75aef6 (diff)
lib/modules: handle typeless options in mergeModules
mkOption does not require a `type` argument and does not set the
resulting attribute if it is not given. Consequently, we need to be
prepared to merge options that have no type information.
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-xlib/tests/modules.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index c81febb4156fb..7cc157025696f 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -365,6 +365,9 @@ checkConfigError \
   config.set \
   ./declare-set.nix ./declare-enable-nested.nix
 
+# Check that that merging of option collisions doesn't depend on type being set
+checkConfigError 'The option .group..*would be a parent of the following options, but its type .<no description>. does not support nested options.\n\s*- option.s. with prefix .group.enable..*' config.group.enable ./merge-typeless-option.nix
+
 # Test that types.optionType merges types correctly
 checkConfigOutput '^10$' config.theOption.int ./optionTypeMerging.nix
 checkConfigOutput '^"hello"$' config.theOption.str ./optionTypeMerging.nix