1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Add testing framework

More tests will arrive shortly...
This commit is contained in:
Étienne Fildadut 2023-12-27 23:19:19 +01:00
parent e71bff9562
commit 53c1c764ba
9 changed files with 263 additions and 1 deletions

11
test/tests/persist.ans Normal file
View file

@ -0,0 +1,11 @@
| pouet={persist("pouet", 7)} (7)
:&d = persist("pouet", 12)
| d={d} (7)
d = 9
| d={d} (9)
| pouet={persist("pouet", 21)} (9)

View file

@ -0,0 +1,34 @@
:c = ()
:choice = 2
:g = $
|c
#pouet
|d
:f = $(anchor=())
:x = 8
anchor ~>
|a
| A |>
| b
c = #pouet
g!
| e
_
| f
| g
| B |>
| boum
|h {x}
| <<>>
f(c)
| <<>>
choice = 1
f(c)
| <<>>
f(c)

View file

@ -0,0 +1,11 @@
:l = *[1,2,3]
:&c = l(2)
| c={c} (2)
| l={l} (*[1,2,3])
c = 5
| c={c} (5)
| l={l} (*[1,5,3])