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

Firth test batch and associated fixes

This commit is contained in:
Étienne Fildadut 2023-12-31 14:30:14 +01:00
parent aa8dfbd498
commit 409a2e7095
22 changed files with 516 additions and 5 deletions

View file

@ -0,0 +1,30 @@
:f = "f"!script($_)
|x
#p!checkpoint($_)
|a
#q!checkpoint($_)
|b
|c
|d
|From start:
f!
|From p checkpoint:
f!
|From q checkpoint:
f!
|From q checkpoint again:
f!
|Go to p again by setting checkpoint manually:
f.current checkpoint = #p
f!
|From q again:
f!

View file

@ -0,0 +1,11 @@
:f = "f"!script($_)
#p!checkpoint
#s!check
f!
f!
|Seen: {f.reached(#s)}
|Reached: {f.reached(#p)}

View file

@ -0,0 +1,14 @@
:f = "f"!script($_)
|x
#p!checkpoint($_)
|a
|b
|Force run checkpoint:
f!from(#p)
|From checkpoint:
f!
|Force no checkpoint:
f!from()

View file

@ -0,0 +1,14 @@
:f = "f"!script($_)
|x
#p!checkpoint($_)
|a
|b
|Force run from checkpoint:
f!from(#p)
|From checkpoint:
f!
|Force no checkpoint:
f!from()

View file

@ -0,0 +1,14 @@
: f = "f"!script($_)
|x
#p!checkpoint($_)
|a
|b
|No checkpoint:
f!
|From checkpoint:
f!
|Force no checkpoint:
f!from()

4
test/tests/paragraph.ans Normal file
View file

@ -0,0 +1,4 @@
:f = "g"!script($_)
#p!checkpoint($_)
|a
|b

View file

@ -0,0 +1,26 @@
:f = "f"!script($_)
|x
#p!checkpoint($_)
|a
#q!checkpoint($_)
|b
|c
|d
|From start:
f!
|From p checkpoint:
f!
|From q checkpoint:
f!
|From q checkpoint again:
f!
|Force p checkpoint:
f!from(#p)

View file

@ -0,0 +1,17 @@
:f = "f"!script($_)
"a":"a" #
|a
1 ~ "x":"x" #
"b":"b" #
#p!checkpoint($_)
"c":"c"# |b
|c
|d
|e
f!
f!

View file

@ -0,0 +1,87 @@
:@choice = 2
:f = "f"!script($_)
| a |>
|-> a
#p!checkpoint
| aa |>
|-> aa
| ab |>
|-> ab
| b |>
|-> b
choice = 2
| c |>
|-> c
choice=1
| f:
f!
| f from #p:
f!from(#p)
:g = "g"!script($_)
| a |>
|-> a
#p!checkpoint
| aa |>
|-> aa
| ab |>
|-> ab
| b |>
|-> b
choice = 2
|autoflush
| c |>
|-> c
choice = 1
| g:
g!
| g from #p:
g!from(#p)
:h = "h"!script($_)
1 ~
| a |>
|-> a
#p!checkpoint
| aa |>
|-> aa
| ab |>
|-> ab
choice = 1
| b |>
|-> b
| c |>
|-> c
choice = 1
| h:
h!
| h from #p:
h!from(#p)
:i = "i"!script($_)
| a |>
|-> a
#p!checkpoint
| aa |>
|-> aa
| ab |>
|-> ab
| b |>
|-> b
1 ~
| c |>
|-> c
| i:
i!
| i from #p:
i!from(#p)

View file

@ -0,0 +1,21 @@
:f = "f"!script($_)
1 ~
#p!checkpoint
|x
~
|y
f!
f!from(#p)
:g = "g"!script($_)
() ~
#p!checkpoint
|x
~
|y
g!
g!from(#p)