diff options
Diffstat (limited to 'lib/tests/misc.nix')
-rw-r--r-- | lib/tests/misc.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index da5e322975096..accceb4ddf9c1 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -106,6 +106,7 @@ let types updateManyAttrsByPath versions + xor ; testingThrow = expr: { @@ -214,6 +215,21 @@ runTests { expected = false; }; + testXor = { + expr = [ + (xor true false) + (xor true true) + (xor false false) + (xor false true) + ]; + expected = [ + true + false + false + true + ]; + }; + testFix = { expr = fix (x: {a = if x ? a then "a" else "b";}); expected = {a = "a";}; |