summary refs log tree commit diff
path: root/lib/tests/modules.sh
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-03-16 21:08:39 +0100
committerSilvan Mosberger <contact@infinisil.com>2020-03-18 04:38:50 +0100
commit15c873b486347e7861c64fb0b5a7852be9fc82e4 (patch)
treec7d2c1bab37592d399368d881c1fea9bea2c9cde /lib/tests/modules.sh
parentdcdd232939232d04c1132b4cc242dd3dac44be8c (diff)
downloadnixpkgs-15c873b486347e7861c64fb0b5a7852be9fc82e4.tar
nixpkgs-15c873b486347e7861c64fb0b5a7852be9fc82e4.tar.gz
nixpkgs-15c873b486347e7861c64fb0b5a7852be9fc82e4.tar.bz2
nixpkgs-15c873b486347e7861c64fb0b5a7852be9fc82e4.tar.lz
nixpkgs-15c873b486347e7861c64fb0b5a7852be9fc82e4.tar.xz
nixpkgs-15c873b486347e7861c64fb0b5a7852be9fc82e4.tar.zst
nixpkgs-15c873b486347e7861c64fb0b5a7852be9fc82e4.zip
lib/modules: Throw better error when definitions assign to an option set
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-xlib/tests/modules.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index 8cd632a439c..0e2fd0bf65d 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -194,6 +194,10 @@ checkConfigOutput "true" config.conditionalWorks ./declare-attrsOf.nix ./attrsOf
 checkConfigOutput "false" config.conditionalWorks ./declare-lazyAttrsOf.nix ./attrsOf-conditional-check.nix
 checkConfigOutput "empty" config.value.foo ./declare-lazyAttrsOf.nix ./attrsOf-conditional-check.nix
 
+# Check error for when an option set is defined to be a non-attribute set value
+checkConfigError 'The option path .* is an attribute set of options, but it is defined to not be an attribute set in' \
+  config.value ./declare-option-set.nix ./define-value-int-zero.nix
+
 cat <<EOF
 ====== module tests ======
 $pass Pass