summary refs log tree commit diff
path: root/lib/tests/modules.sh
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-03-10 20:25:49 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-03-10 20:25:49 +0100
commit55ee7ab4a6b5281cf1c352bc714b07c59c4546ee (patch)
tree88e1047bc4f89890be69997da44acdb5e5bb715c /lib/tests/modules.sh
parent87fce11f62f21409321ce0f2441f03901c9c8a9f (diff)
downloadnixpkgs-55ee7ab4a6b5281cf1c352bc714b07c59c4546ee.tar
nixpkgs-55ee7ab4a6b5281cf1c352bc714b07c59c4546ee.tar.gz
nixpkgs-55ee7ab4a6b5281cf1c352bc714b07c59c4546ee.tar.bz2
nixpkgs-55ee7ab4a6b5281cf1c352bc714b07c59c4546ee.tar.lz
nixpkgs-55ee7ab4a6b5281cf1c352bc714b07c59c4546ee.tar.xz
nixpkgs-55ee7ab4a6b5281cf1c352bc714b07c59c4546ee.tar.zst
nixpkgs-55ee7ab4a6b5281cf1c352bc714b07c59c4546ee.zip
lib.types.optionType: Only merge when necessary
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 e4bb7ad2190..350fe85e748 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -311,6 +311,9 @@ checkConfigOutput '^"hello"$' config.theOption.str ./optionTypeMerging.nix
 # Test that types.optionType correctly annotates option locations
 checkConfigError 'The option .theOption.nested. in .other.nix. is already declared in .optionTypeFile.nix.' config.theOption.nested ./optionTypeFile.nix
 
+# Test that types.optionType leaves types untouched as long as they don't need to be merged
+checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survives-type-merge.nix
+
 cat <<EOF
 ====== module tests ======
 $pass Pass