diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index aa9d3443fb6a..bf309a604f26 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -171,6 +171,8 @@ checkConfigError() { # Shorthand meta attribute does not duplicate the config checkConfigOutput '^"one two"$' config.result ./shorthand-meta.nix +checkConfigError "In module .*test-push-down-non-attrs.nix., you're trying to define a value of type \`bool'\n\s*rather than an attribute set for the option" config ./test-push-down-non-attrs.nix + checkConfigOutput '^true$' config.result ./test-mergeAttrDefinitionsWithPrio.nix # Check that a module argument is passed, also when a default is available diff --git a/lib/tests/modules/test-push-down-non-attrs.nix b/lib/tests/modules/test-push-down-non-attrs.nix new file mode 100644 index 000000000000..ce9222ca3cfd --- /dev/null +++ b/lib/tests/modules/test-push-down-non-attrs.nix @@ -0,0 +1,5 @@ +{ lib, ... }: + +{ + config = lib.mkIf true true; +}