From 55ee7ab4a6b5281cf1c352bc714b07c59c4546ee Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 10 Mar 2022 20:25:49 +0100 Subject: lib.types.optionType: Only merge when necessary --- lib/tests/modules.sh | 3 +++ .../modules/adhoc-freeformType-survives-type-merge.nix | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 lib/tests/modules/adhoc-freeformType-survives-type-merge.nix (limited to 'lib/tests') diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index e4bb7ad21900f..350fe85e7487f 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 <