diff options
Diffstat (limited to 'nixpkgs/lib/tests/modules')
-rw-r--r-- | nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix | 9 | ||||
-rw-r--r-- | nixpkgs/lib/tests/modules/alias-with-priority.nix | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix b/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix index a6b26895f3a8..9a18c9d9f613 100644 --- a/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix +++ b/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix @@ -1,5 +1,8 @@ # This is a test to show that mkAliasOptionModule sets the priority correctly # for aliased options. +# +# This test shows that an alias with a high priority is able to override +# a non-aliased option. { config, lib, ... }: @@ -32,10 +35,10 @@ with lib; imports = [ # Create an alias for the "enable" option. - (mkAliasOptionModuleWithPriority [ "enableAlias" ] [ "enable" ]) + (mkAliasOptionModule [ "enableAlias" ] [ "enable" ]) - # Disable the aliased option, but with a default (low) priority so it - # should be able to be overridden by the next import. + # Disable the aliased option with a high priority so it + # should override the next import. ( { config, lib, ... }: { enableAlias = lib.mkForce false; diff --git a/nixpkgs/lib/tests/modules/alias-with-priority.nix b/nixpkgs/lib/tests/modules/alias-with-priority.nix index 923483684cb1..a35a06fc6974 100644 --- a/nixpkgs/lib/tests/modules/alias-with-priority.nix +++ b/nixpkgs/lib/tests/modules/alias-with-priority.nix @@ -1,5 +1,8 @@ # This is a test to show that mkAliasOptionModule sets the priority correctly # for aliased options. +# +# This test shows that an alias with a low priority is able to be overridden +# with a non-aliased option. { config, lib, ... }: @@ -32,7 +35,7 @@ with lib; imports = [ # Create an alias for the "enable" option. - (mkAliasOptionModuleWithPriority [ "enableAlias" ] [ "enable" ]) + (mkAliasOptionModule [ "enableAlias" ] [ "enable" ]) # Disable the aliased option, but with a default (low) priority so it # should be able to be overridden by the next import. |