From 83712164e6eafcfbc80e290c62cd8adc9cdd0168 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 9 Dec 2023 20:38:29 +0100 Subject: [PATCH] lib/modules: Clarify test assertions --- lib/tests/modules.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 789d8e00dda8..c899953b065f 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -95,7 +95,10 @@ checkConfigOutput '^true$' config.result ./module-argument-default.nix checkConfigOutput '^true$' config.assertion ./gvariant.nix # https://github.com/NixOS/nixpkgs/pull/131205 +# We currently throw this error already in `config`, but throwing in `config.wrong1` would be acceptable. checkConfigError 'It seems as if you.re trying to declare an option by placing it into .config. rather than .options.' config.wrong1 ./error-mkOption-in-config.nix +# We currently throw this error already in `config`, but throwing in `config.nest.wrong2` would be acceptable. +checkConfigError 'It seems as if you.re trying to declare an option by placing it into .config. rather than .options.' config.nest.wrong2 ./error-mkOption-in-config.nix checkConfigError 'The option .sub.wrong2. does not exist. Definition values:' config.sub ./error-mkOption-in-submodule-config.nix checkConfigError '.*This can happen if you e.g. declared your options in .types.submodule.' config.sub ./error-mkOption-in-submodule-config.nix