diff options
Diffstat (limited to 'lib/tests.nix')
-rw-r--r-- | lib/tests.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/tests.nix b/lib/tests.nix index 1a9a5accd1c0..d93cadf25335 100644 --- a/lib/tests.nix +++ b/lib/tests.nix @@ -277,4 +277,14 @@ runTests { expected = [ "2001" "db8" "0" "0042" "" "8a2e" "370" "" ]; }; + testComposeExtensions = { + expr = let obj = makeExtensible (self: { foo = self.bar; }); + f = self: super: { bar = false; baz = true; }; + g = self: super: { bar = super.baz or false; }; + f_o_g = composeExtensions f g; + composed = obj.extend f_o_g; + in composed.foo; + expected = true; + }; + } |