diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-10-11 22:56:53 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-10-11 22:56:53 +0200 |
commit | 0a10279342995a40fc4ad08a7f2a8250cc5ef4d7 (patch) | |
tree | 0b8090fcff9fdba4b51c79ed1d675dbebd2f9356 /lib/tests | |
parent | f6caf65a4a8031f9e1073949734d91b3293034b0 (diff) | |
download | nixlib-0a10279342995a40fc4ad08a7f2a8250cc5ef4d7.tar nixlib-0a10279342995a40fc4ad08a7f2a8250cc5ef4d7.tar.gz nixlib-0a10279342995a40fc4ad08a7f2a8250cc5ef4d7.tar.bz2 nixlib-0a10279342995a40fc4ad08a7f2a8250cc5ef4d7.tar.lz nixlib-0a10279342995a40fc4ad08a7f2a8250cc5ef4d7.tar.xz nixlib-0a10279342995a40fc4ad08a7f2a8250cc5ef4d7.tar.zst nixlib-0a10279342995a40fc4ad08a7f2a8250cc5ef4d7.zip |
lib.makeOverridable: fix functionArgs on returned function
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/misc.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 6527c31e49c2..2e7fda2b1f8b 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -43,6 +43,18 @@ in runTests { +# CUSTOMIZATION + + testFunctionArgsMakeOverridable = { + expr = functionArgs (makeOverridable ({ a, b, c ? null}: {})); + expected = { a = false; b = false; c = true; }; + }; + + testFunctionArgsMakeOverridableOverride = { + expr = functionArgs (makeOverridable ({ a, b, c ? null }: {}) { a = 1; b = 2; }).override; + expected = { a = false; b = false; c = true; }; + }; + # TRIVIAL testId = { |