lib/tests: Add overrideExisting tests

wip/yesman
Silvan Mosberger 6 years ago
parent 5cfdec6e94
commit afd8620621
No known key found for this signature in database
GPG Key ID: 9424360B4B85C9E7
  1. 14
      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

Loading…
Cancel
Save