From 82b68e09a3fd10e3953fcee1208178d63d12a570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Reuh=20Fildadut?= Date: Wed, 3 Jan 2024 16:46:12 +0100 Subject: [PATCH] Update tests --- test/results/closure capture environment.ans | 7 ++ ...me from paragraph with nested choice 2.ans | 28 ++++++++ ...me from paragraph with nested choice 3.ans | 24 +++++++ ...me from paragraph with nested choice 4.ans | 24 +++++++ ...sume from paragraph with nested choice.ans | 61 +----------------- test/tests/closure capture environment.ans | 10 +++ ...me from paragraph with nested choice 2.ans | 22 +++++++ ...me from paragraph with nested choice 3.ans | 22 +++++++ ...me from paragraph with nested choice 4.ans | 20 ++++++ ...sume from paragraph with nested choice.ans | 64 ------------------- 10 files changed, 158 insertions(+), 124 deletions(-) create mode 100644 test/results/closure capture environment.ans create mode 100644 test/results/resume from paragraph with nested choice 2.ans create mode 100644 test/results/resume from paragraph with nested choice 3.ans create mode 100644 test/results/resume from paragraph with nested choice 4.ans create mode 100644 test/tests/closure capture environment.ans create mode 100644 test/tests/resume from paragraph with nested choice 2.ans create mode 100644 test/tests/resume from paragraph with nested choice 3.ans create mode 100644 test/tests/resume from paragraph with nested choice 4.ans diff --git a/test/results/closure capture environment.ans b/test/results/closure capture environment.ans new file mode 100644 index 0000000..358831e --- /dev/null +++ b/test/results/closure capture environment.ans @@ -0,0 +1,7 @@ +--# run #-- +--- text --- +| {}"" {}"12" {}"" | +--- return --- +() +--# saved #-- +{} \ No newline at end of file diff --git a/test/results/resume from paragraph with nested choice 2.ans b/test/results/resume from paragraph with nested choice 2.ans new file mode 100644 index 0000000..4435a2d --- /dev/null +++ b/test/results/resume from paragraph with nested choice 2.ans @@ -0,0 +1,28 @@ +--# run #-- +--- text --- +| {}"g:" | +--- choice --- + > | {}"a" | +=> | {}"b" | +--- text --- +| {}"-> b" | +| {}"autoflush" | +--- choice --- +=> | {}"c" | +--- text --- +| {}"-> c" | +| {}"g from #p:" | +--- choice --- + > | {}"aa" | +=> | {}"ab" | +--- text --- +| {}"-> ab" | +| {}"autoflush" | +--- choice --- +=> | {}"c" | +--- text --- +| {}"-> c" | +--- return --- +() +--# saved #-- +{"g.checkpoint":#p, "g.run":2} \ No newline at end of file diff --git a/test/results/resume from paragraph with nested choice 3.ans b/test/results/resume from paragraph with nested choice 3.ans new file mode 100644 index 0000000..5b6156a --- /dev/null +++ b/test/results/resume from paragraph with nested choice 3.ans @@ -0,0 +1,24 @@ +--# run #-- +--- text --- +| {}"h:" | +--- choice --- +=> | {}"a" | + > | {}"b" | + > | {}"c" | +--- text --- +| {}"-> a" | +--- choice --- +=> | {}"aa" | + > | {}"ab" | +--- text --- +| {}"-> aa" | +| {}"h from #p:" | +--- choice --- +=> | {}"aa" | + > | {}"ab" | +--- text --- +| {}"-> aa" | +--- return --- +() +--# saved #-- +{"h.checkpoint":#p, "h.reached":*{#p:1}, "h.run":2} \ No newline at end of file diff --git a/test/results/resume from paragraph with nested choice 4.ans b/test/results/resume from paragraph with nested choice 4.ans new file mode 100644 index 0000000..64f71b8 --- /dev/null +++ b/test/results/resume from paragraph with nested choice 4.ans @@ -0,0 +1,24 @@ +--# run #-- +--- text --- +| {}"i:" | +--- choice --- +=> | {}"a" | + > | {}"b" | + > | {}"c" | +--- text --- +| {}"-> a" | +--- choice --- +=> | {}"aa" | + > | {}"ab" | +--- text --- +| {}"-> aa" | +| {}"i from #p:" | +--- choice --- +=> | {}"aa" | + > | {}"ab" | +--- text --- +| {}"-> aa" | +--- return --- +() +--# saved #-- +{"i.checkpoint":#p, "i.reached":*{#p:1}, "i.run":2} \ No newline at end of file diff --git a/test/results/resume from paragraph with nested choice.ans b/test/results/resume from paragraph with nested choice.ans index 04077ae..36fd9c8 100644 --- a/test/results/resume from paragraph with nested choice.ans +++ b/test/results/resume from paragraph with nested choice.ans @@ -16,70 +16,11 @@ => | {}"ab" | --- text --- | {}"-> ab" | ---- text --- -| {}"g:" | ---- choice --- - > | {}"a" | -=> | {}"b" | ---- text --- -| {}"-> b" | -| {}"autoflush" | --- choice --- => | {}"c" | --- text --- | {}"-> c" | -| {}"g from #p:" | ---- choice --- - > | {}"aa" | -=> | {}"ab" | ---- text --- -| {}"-> ab" | -| {}"autoflush" | ---- choice --- -=> | {}"c" | ---- text --- -| {}"-> c" | ---- text --- -| {}"h:" | ---- choice --- -=> | {}"a" | - > | {}"b" | - > | {}"c" | ---- text --- -| {}"-> a" | ---- choice --- -=> | {}"aa" | - > | {}"ab" | ---- text --- -| {}"-> aa" | -| {}"h from #p:" | ---- choice --- -=> | {}"aa" | - > | {}"ab" | - > | {}"c" | ---- text --- -| {}"-> aa" | ---- text --- -| {}"i:" | ---- choice --- -=> | {}"a" | - > | {}"b" | - > | {}"c" | ---- text --- -| {}"-> a" | ---- choice --- -=> | {}"aa" | - > | {}"ab" | ---- text --- -| {}"-> aa" | -| {}"i from #p:" | ---- choice --- -=> | {}"aa" | - > | {}"ab" | - > | {}"c" | ---- text --- -| {}"-> aa" | --- return --- () --# saved #-- -{"f.checkpoint":#p, "f.run":2, "g.checkpoint":#p, "g.run":2, "h.checkpoint":#p, "h.reached":*{#p:1}, "h.run":2, "i.checkpoint":#p, "i.reached":*{#p:1}, "i.run":2} \ No newline at end of file +{"f.checkpoint":#p, "f.run":2} \ No newline at end of file diff --git a/test/tests/closure capture environment.ans b/test/tests/closure capture environment.ans new file mode 100644 index 0000000..c36b2f8 --- /dev/null +++ b/test/tests/closure capture environment.ans @@ -0,0 +1,10 @@ +:f = () +:a = 12 + +_ + f = $ + |{a} + + :a = 42 + + f! diff --git a/test/tests/resume from paragraph with nested choice 2.ans b/test/tests/resume from paragraph with nested choice 2.ans new file mode 100644 index 0000000..783873c --- /dev/null +++ b/test/tests/resume from paragraph with nested choice 2.ans @@ -0,0 +1,22 @@ +:@choice=1 +: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) diff --git a/test/tests/resume from paragraph with nested choice 3.ans b/test/tests/resume from paragraph with nested choice 3.ans new file mode 100644 index 0000000..9f7e9dd --- /dev/null +++ b/test/tests/resume from paragraph with nested choice 3.ans @@ -0,0 +1,22 @@ +:@choice = 1 +:h = "h"!script($_) + if(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) diff --git a/test/tests/resume from paragraph with nested choice 4.ans b/test/tests/resume from paragraph with nested choice 4.ans new file mode 100644 index 0000000..bda2426 --- /dev/null +++ b/test/tests/resume from paragraph with nested choice 4.ans @@ -0,0 +1,20 @@ +:@choice = 1 +:i = "i"!script($_) + | a |> + |-> a + #p!checkpoint + | aa |> + |-> aa + | ab |> + |-> ab + | b |> + |-> b + if(1) + | c |> + |-> c + +| i: +i! + +| i from #p: +i!from(#p) diff --git a/test/tests/resume from paragraph with nested choice.ans b/test/tests/resume from paragraph with nested choice.ans index ebec961..841c908 100644 --- a/test/tests/resume from paragraph with nested choice.ans +++ b/test/tests/resume from paragraph with nested choice.ans @@ -21,67 +21,3 @@ 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($_) - if(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 - if(1) - | c |> - |-> c - -| i: -i! - -| i from #p: -i!from(#p)