diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 65de8e378c7e..e0774383720b 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -115,6 +115,11 @@ set -- config.enable ./declare-enable.nix ./define-enable.nix ./define-loaOfSub- checkConfigError 'The option .* defined in .* does not exist.' "$@" checkConfigOutput "true" "$@" ./define-module-check.nix +# Check coerced value. +checkConfigOutput "\"42\"" config.value ./declare-coerced-value.nix +checkConfigOutput "\"24\"" config.value ./declare-coerced-value.nix ./define-value-string.nix +checkConfigError 'The option value .* in .* is not a coercedTo.' config.value ./declare-coerced-value.nix ./define-value-list.nix + cat <