diff options
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/misc.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 193e68a96933c..041122feadae8 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -55,6 +55,24 @@ runTests { expected = { a = false; b = false; c = true; }; }; + testCallPackageWithOverridePreservesArguments = + let + f = { a ? 0, b }: {}; + f' = callPackageWith { a = 1; b = 2; } f {}; + in { + expr = functionArgs f'.override; + expected = functionArgs f; + }; + + testCallPackagesWithOverridePreservesArguments = + let + f = { a ? 0, b }: { nested = {}; }; + f' = callPackagesWith { a = 1; b = 2; } f {}; + in { + expr = functionArgs f'.nested.override; + expected = functionArgs f; + }; + # TRIVIAL testId = { |