diff --git a/examples/tests.modal b/examples/tests.modal index 121d991..77866f2 100644 --- a/examples/tests.modal +++ b/examples/tests.modal @@ -9,12 +9,16 @@ nap tap test ?(?-) (Empty replacements) -<> (?x pop-plain) +<> (?x rightless/pop) <> (?x pop) () <> (ghost) () +<> (prefix/pop ?x) (ok) +<> (?x suffix/pop) (ok) -abc def pop-plain = abc test -abc def pop = abc test +(abc rightless/pop) = () test +(prefix/pop foo) = (ok) test +(foo suffix/pop) = (ok) test +(abc def pop) = (abc) test (ghost) = () test ?(?-) (Basic replacements) @@ -25,13 +29,15 @@ replace-name (foo) (bar) test ?(?-) (Basic register setups) -<> (dup (?x)) ((?x ?x) =) -<> (swap (?x ?y)) ((?y ?x) =) -<> (compare (?x ?x ?x)) ((#t) =) +<> (dup (?x)) (?x ?x) +<> (swap (?x ?y)) (?y ?x) +<> (compare (?x ?x ?x)) (#t) +<> (rotate (?x (?y (?z)))) (?y (?z (?x))) -dup (abc) (abc abc) test -swap (abc def) (def abc) test -compare (abc abc abc) (#t) test +(dup (abc)) = (abc abc) test +(swap (abc def)) = (def abc) test +compare (abc abc abc) = #t test +(rotate (abc (def (ghi)))) = (def (ghi (abc))) test ?(?-) (Empty register replacement)