about summary refs log tree commit diff
path: root/z-yants-tests.nix
diff options
context:
space:
mode:
Diffstat (limited to 'z-yants-tests.nix')
-rw-r--r--z-yants-tests.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/z-yants-tests.nix b/z-yants-tests.nix
index b97d058c0447..e1e521c5abf0 100644
--- a/z-yants-tests.nix
+++ b/z-yants-tests.nix
@@ -63,6 +63,11 @@ deepSeq rec {
     };
   };
 
+  testSumMatch = creature.match testSum {
+    human = v: "It's a human named ${v.name}";
+    pet = v: throw "It's not supposed to be a pet!";
+  };
+
   # Test curried function definitions
   func = defun [ string int string ]
   (name: age: "${name} is ${toString age} years old");