diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-09-18 11:37:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 11:37:30 +0100 |
commit | 83d89edc6eaff506e42e099fa4cdf45d09e7ec5f (patch) | |
tree | 7058e7ee23ffb5c874a6e589461abbe762071b58 /lib/tests | |
parent | 7d39e99a1ec67ac182796f517fc61c3824771c32 (diff) | |
parent | c7104d97c87316a6062c88696d80a45918fab7a6 (diff) |
Merge pull request #46336 from Infinisil/overrideExisting
lib: Improve overrideExisting implementation
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/misc.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index d3bd7746d89c..d89bcfde4819 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 |