From b89b23b6b2a4f642b7a1f3c5969e59a356b0be0b Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Sat, 4 Jan 2020 02:01:21 +0100 Subject: [PATCH] lib/tests: Add tests for recursive disabledModules --- lib/tests/modules.sh | 6 ++++++ lib/tests/modules/disable-recursive/bar.nix | 5 +++++ lib/tests/modules/disable-recursive/disable-bar.nix | 7 +++++++ lib/tests/modules/disable-recursive/disable-foo.nix | 7 +++++++ lib/tests/modules/disable-recursive/foo.nix | 5 +++++ lib/tests/modules/disable-recursive/main.nix | 8 ++++++++ 6 files changed, 38 insertions(+) create mode 100644 lib/tests/modules/disable-recursive/bar.nix create mode 100644 lib/tests/modules/disable-recursive/disable-bar.nix create mode 100644 lib/tests/modules/disable-recursive/disable-foo.nix create mode 100644 lib/tests/modules/disable-recursive/foo.nix create mode 100644 lib/tests/modules/disable-recursive/main.nix diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 4690e380ce3..a2590661d00 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -182,6 +182,12 @@ checkConfigOutput "true" config.submodule.outer ./declare-submoduleWith-modules. ## Paths should be allowed as values and work as expected checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix +# Check that disabledModules works recursively and correctly +checkConfigOutput "true" config.enable ./disable-recursive/main.nix +checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-foo.nix} +checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-bar.nix} +checkConfigError 'The option .* defined in .* does not exist' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix} + cat <