From 0a10279342995a40fc4ad08a7f2a8250cc5ef4d7 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 11 Oct 2023 22:56:53 +0200 Subject: lib.makeOverridable: fix functionArgs on returned function --- lib/tests/misc.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/tests') 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 = { -- cgit 1.4.1