diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index d3bd7746d89..d89bcfde481 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -236,6 +236,20 @@ runTests { }; }; + testOverrideExistingEmpty = { + expr = overrideExisting {} { a = 1; }; + expected = {}; + }; + + testOverrideExistingDisjoint = { + expr = overrideExisting { b = 2; } { a = 1; }; + expected = { b = 2; }; + }; + + testOverrideExistingOverride = { + expr = overrideExisting { a = 3; b = 2; } { a = 1; }; + expected = { a = 1; b = 2; }; + }; # GENERATORS # these tests assume attributes are converted to lists