diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-02-14 23:18:44 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-03-03 13:45:22 +0100 |
commit | d88721e4408988202a0ae3cea3f5551ebfa13168 (patch) | |
tree | 5eca06d1133b1615b7c6e667ba7c42f7e97548b3 /lib/tests/modules.sh | |
parent | bb9a37a2a56249483cd98ef09c254b78e736af1a (diff) | |
download | nixpkgs-d88721e4408988202a0ae3cea3f5551ebfa13168.tar nixpkgs-d88721e4408988202a0ae3cea3f5551ebfa13168.tar.gz nixpkgs-d88721e4408988202a0ae3cea3f5551ebfa13168.tar.bz2 nixpkgs-d88721e4408988202a0ae3cea3f5551ebfa13168.tar.lz nixpkgs-d88721e4408988202a0ae3cea3f5551ebfa13168.tar.xz nixpkgs-d88721e4408988202a0ae3cea3f5551ebfa13168.tar.zst nixpkgs-d88721e4408988202a0ae3cea3f5551ebfa13168.zip |
modules: add support for module replacement with disabledModules
This is based on a prototype Nicolas B. Pierron worked on during a discussion we had at FOSDEM. A new version with a workaround for problems of the reverted original. Discussion: https://github.com/NixOS/nixpkgs/commit/3f2566689
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-x | lib/tests/modules.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 8b476a5d3dc..ba0c67fb7d4 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -99,6 +99,14 @@ checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-if-foo-enabl checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-foo-if-enable.nix checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-foo-enable-if.nix +# Check disabledModules with config definitions and option declarations. +set -- config.enable ./define-enable.nix ./declare-enable.nix +checkConfigOutput "true" "$@" +checkConfigOutput "false" "$@" ./disable-define-enable.nix +checkConfigError "The option .*enable.* defined in .* does not exist" "$@" ./disable-declare-enable.nix +checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-define-enable.nix ./disable-declare-enable.nix +checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-enable-modules.nix + # Check _module.args. set -- config.enable ./declare-enable.nix ./define-enable-with-custom-arg.nix checkConfigError 'while evaluating the module argument .*custom.* in .*define-enable-with-custom-arg.nix.*:' "$@" |