From 45e0df792b8361be22fdf0c8cd3662e5a62a62fd Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 15 Apr 2024 19:47:11 -0700 Subject: [PATCH] Expanded tests --- examples/tests.modal | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/examples/tests.modal b/examples/tests.modal index fb81930..03a3027 100644 --- a/examples/tests.modal +++ b/examples/tests.modal @@ -4,6 +4,20 @@ <> (?x = ?x test) (#ok) <> (?x = ?y test) (#fail) +?(?-) (Empty replacements) + +<> (?x pop-plain) +<> (?x pop) () + +abc def pop-plain = abc test +abc def pop = abc test + +?(?-) (Basic replacements) + +<> (replace-name (foo)) ((bar) =) + +replace-name (foo) (bar) test + ?(?-) (Basic register setups) <> (dup (?x)) ((?x ?x) =) @@ -17,4 +31,16 @@ compare (abc abc abc) (#t) test ?(?-) (Lambdas) ?((?x) ((?x ?x) =)) abc (abc abc) test +abc ?(?x) def = abc test +?(?-) (Explode) + +<> (explode ?*) ((?*) =) + +explode cow (c (o (w ()))) test + +?(?-) (Implode) + +<> (implode ?*) (?* =) + +implode (b (a (t ()))) bat test