lib/types: Test attrsWith type merging
Co-Authored-By: @hsjobeki
This commit is contained in:
committed by
Johannes Kirschbauer
parent
5b7a21358d
commit
bd353d322c
@@ -386,6 +386,10 @@ checkConfigOutput '^true$' config.conditionalWorks ./declare-attrsOf.nix ./attrs
|
||||
checkConfigOutput '^false$' config.conditionalWorks ./declare-lazyAttrsOf.nix ./attrsOf-conditional-check.nix
|
||||
checkConfigOutput '^"empty"$' config.value.foo ./declare-lazyAttrsOf.nix ./attrsOf-conditional-check.nix
|
||||
|
||||
# Check attrsWith type merging
|
||||
checkConfigError 'The option `mergedLazyNonLazy'\'' in `.*'\'' is already declared in `.*'\''\.' options.mergedLazyNonLazy ./lazy-attrsWith.nix
|
||||
checkConfigOutput '^11$' config.lazyResult ./lazy-attrsWith.nix
|
||||
checkConfigError 'infinite recursion encountered' config.nonLazyResult ./lazy-attrsWith.nix
|
||||
|
||||
# Even with multiple assignments, a type error should be thrown if any of them aren't valid
|
||||
checkConfigError 'A definition for option .* is not of type .*' \
|
||||
@@ -575,8 +579,6 @@ checkConfigOutput '^38|27$' options.submoduleLine38.declarationPositions.1.line
|
||||
# nested options work
|
||||
checkConfigOutput '^34$' options.nested.nestedLine34.declarationPositions.0.line ./declaration-positions.nix
|
||||
|
||||
# AttrsWith tests
|
||||
checkConfigOutput '^11$' config.result ./lazy-attrsWith.nix
|
||||
|
||||
cat <<EOF
|
||||
====== module tests ======
|
||||
|
||||
Reference in New Issue
Block a user