summary refs log tree commit diff
path: root/lib/tests/modules.sh
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2021-01-26 22:30:07 +0100
committerSilvan Mosberger <contact@infinisil.com>2021-01-27 00:17:56 +0100
commitc2f3556dc75ee09890c2cfc867cdb10df23accf6 (patch)
tree222adbe573628240363421c26ad2e7f5474260ed /lib/tests/modules.sh
parente9101d4a3bc90dfaaa076d8ec00e5ed68e518f60 (diff)
downloadnixpkgs-c2f3556dc75ee09890c2cfc867cdb10df23accf6.tar
nixpkgs-c2f3556dc75ee09890c2cfc867cdb10df23accf6.tar.gz
nixpkgs-c2f3556dc75ee09890c2cfc867cdb10df23accf6.tar.bz2
nixpkgs-c2f3556dc75ee09890c2cfc867cdb10df23accf6.tar.lz
nixpkgs-c2f3556dc75ee09890c2cfc867cdb10df23accf6.tar.xz
nixpkgs-c2f3556dc75ee09890c2cfc867cdb10df23accf6.tar.zst
nixpkgs-c2f3556dc75ee09890c2cfc867cdb10df23accf6.zip
lib/tests: More functionTo tests
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-xlib/tests/modules.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index 2d3a696e980..f843d303e44 100755
--- a/lib/tests/modules.sh
+++ b/lib/tests/modules.sh
@@ -262,8 +262,12 @@ checkConfigOutput true config.value.mkbefore ./types-anything/mk-mods.nix
 checkConfigOutput 1 config.value.nested.foo ./types-anything/mk-mods.nix
 checkConfigOutput baz config.value.nested.bar.baz ./types-anything/mk-mods.nix
 
-# Check the merge behaviour of the functionTo type.
-checkConfigOutput "a b" config.result ./functionTo.nix
+## types.functionTo
+checkConfigOutput "input is input" config.result ./functionTo/trivial.nix
+checkConfigOutput "a b" config.result ./functionTo/merging-list.nix
+checkConfigError 'A definition for option .fun.\[function body\]. is not of type .string.. Definition values:\n- In .*wrong-type.nix' config.result ./functionTo/wrong-type.nix
+checkConfigOutput "b a" config.result ./functionTo/list-order.nix
+checkConfigOutput "a c" config.result ./functionTo/merging-attrs.nix
 
 cat <<EOF
 ====== module tests ======