diff --git a/test/function/builtin/special/CASETester.java b/test/function/builtin/special/CASETester.java index 3e79ec3..1abb3bb 100644 --- a/test/function/builtin/special/CASETester.java +++ b/test/function/builtin/special/CASETester.java @@ -67,6 +67,20 @@ public class CASETester { assertSExpressionsMatch(parseString("nil"), evaluateString(input)); } + @Test + public void caseWithSeveralItemsInKeyList_Match() { + String input = "(case :a ((:b :a) 'orange) ((:c :d) 'banana))"; + + assertSExpressionsMatch(parseString("orange"), evaluateString(input)); + } + + @Test + public void caseWithSeveralItemsInKeyList_NoMatch() { + String input = "(case :a ((:b :f) 'orange) ((:c :d) 'banana))"; + + assertSExpressionsMatch(parseString("nil"), evaluateString(input)); + } + @Test public void caseWithSymbolicKeyList_Match() { String input = "(case :a (:a 'orange))";