From 8b957e3b301d748e6fbbed806d82bd9d4b9d4ac4 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Wed, 30 Sep 2020 01:47:10 +0200 Subject: [PATCH] lib/tests: Add type deprecation tests --- lib/tests/modules.sh | 6 ++++ lib/tests/modules/type-deprecation.nix | 39 ++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 lib/tests/modules/type-deprecation.nix diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 2e57c2f8e2a1..4259c538bb43 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -272,6 +272,12 @@ checkConfigError 'A definition for option .fun.\[function body\]. is not of type checkConfigOutput "b a" config.result ./functionTo/list-order.nix checkConfigOutput "a c" config.result ./functionTo/merging-attrs.nix +## Type deprecation +checkConfigError 'The type `types.simple'\'' of option `simple'\'' defined in .* is deprecated. simple shall not be used' config.simple ./type-deprecation.nix +checkConfigError 'The type `types.infinite'\'' of option `infinite'\'' defined in .* is deprecated. infinite shall not be used' config.infinite ./type-deprecation.nix +checkConfigError 'The type `types.left'\'' of option `nested'\'' defined in .* is deprecated. left shall not be used' config.nested ./type-deprecation.nix +checkConfigError 'The type `types.right'\'' of option `nested'\'' defined in .* is deprecated. right shall not be used' config.nested ./type-deprecation.nix + cat <