From 14ce4eb176b05179dbfd467f754df88f8f3fb8cc Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 23 Apr 2024 13:45:03 -0700 Subject: [PATCH] Added tests --- examples/tests.modal | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/tests.modal b/examples/tests.modal index 822a8dc..8a47786 100644 --- a/examples/tests.modal +++ b/examples/tests.modal @@ -58,15 +58,22 @@ prefix-anything = anything-suffix (substring 2) test (?(?x (?x ?x)) abc) = (abc abc) (lambda 1) test abc ?(?x) def = abc (lambda 2) test -?(?-) (Explode) +?(?-) (op: explode) -(?(?* ?*) cow) = (c (o (w ()))) (explode 1) test -(?(?* ?*) (12 34 45)) = (12 (34 (45 ()))) (explode 2) test +(?(?* ?*) cow) = (c (o (w ()))) (explode word) test +(?(?* ?*) (12 34 45)) = (12 (34 (45 ()))) (explode tuple) test +(?(?* ?*) ()) = () (explode empty) test ?(?-) (op: join) ?(?^ ?^) (b (a (t ()))) = bat (join 1) test ?(?^ ?^) (12 (34 (56 ()))) = 123456 (join 2) test +(?(?^ ?^) ()) = () (join empty) test + +?(?-) (op: unwrap) + +?(?. ?.) (abcd) = abcd (unwrap 1) test +(?(?. ?.) ()) = () (unwrap empty) test ?(?-) (List reversal)