diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-01-24 15:58:17 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-03-03 00:28:35 +0100 |
commit | d030e2109fd491e32cb48df54d100aa608551298 (patch) | |
tree | 6da4c8737d4d14e9cb049c5872f6671bbfe4494e /lib/tests/modules.sh | |
parent | 33e8df0921c410320185c9a1859656a4ec771f62 (diff) | |
download | nixpkgs-d030e2109fd491e32cb48df54d100aa608551298.tar nixpkgs-d030e2109fd491e32cb48df54d100aa608551298.tar.gz nixpkgs-d030e2109fd491e32cb48df54d100aa608551298.tar.bz2 nixpkgs-d030e2109fd491e32cb48df54d100aa608551298.tar.lz nixpkgs-d030e2109fd491e32cb48df54d100aa608551298.tar.xz nixpkgs-d030e2109fd491e32cb48df54d100aa608551298.tar.zst nixpkgs-d030e2109fd491e32cb48df54d100aa608551298.zip |
lib.modules: Let module declare options directly in bare submodule
... where a bare submodule is an option that has a type like `submoduleWith x`, as opposed to `attrsOf (submoduleWith x)`. This makes migration unnecessary when introducing a freeform type in an existing option tree. Closes #146882
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-x | lib/tests/modules.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index e4bb7ad2190..3591b8f1e6f 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -62,6 +62,11 @@ checkConfigError() { checkConfigOutput '^false$' config.enable ./declare-enable.nix checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*: true' config.enable ./define-enable.nix +checkConfigOutput '^1$' config.bare-submodule.nested ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix +checkConfigOutput '^2$' config.bare-submodule.deep ./declare-bare-submodule.nix ./declare-bare-submodule-deep-option.nix +checkConfigOutput '^42$' config.bare-submodule.nested ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix ./declare-bare-submodule-deep-option.nix ./define-bare-submodule-values.nix +checkConfigOutput '^420$' config.bare-submodule.deep ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix ./declare-bare-submodule-deep-option.nix ./define-bare-submodule-values.nix + # Check integer types. # unsigned checkConfigOutput '^42$' config.value ./declare-int-unsigned-value.nix ./define-value-int-positive.nix |