summaryrefslogtreecommitdiff
path: root/examples/noc/test/flow_field.reload.script
diff options
context:
space:
mode:
Diffstat (limited to 'examples/noc/test/flow_field.reload.script')
-rw-r--r--examples/noc/test/flow_field.reload.script27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/noc/test/flow_field.reload.script b/examples/noc/test/flow_field.reload.script
new file mode 100644
index 0000000..acad47a
--- /dev/null
+++ b/examples/noc/test/flow_field.reload.script
@@ -0,0 +1,27 @@
+# Live reload keeps State: a new field, a paused replay, the edited build
+# ({v2}: blue vehicles), the same seed and vehicles after it, then play on.
+frames 30
+click 320 180
+frames 30
+console record 0
+frames 30
+console stop
+console play 0
+frames 10
+console pause
+frames 2
+expect flowfield.seed 2947
+expect vehicles[5].position[0] 595.765 ~0.01
+screenshot .zig-cache/e2e/flow_field-before.png
+frames 1
+load {v2}
+expect flowfield.seed 2947
+expect vehicles[5].position[0] 595.765 ~0.01
+frames 2
+screenshot .zig-cache/e2e/flow_field-after.png
+frames 1
+expect-different-screenshot .zig-cache/e2e/flow_field-before.png .zig-cache/e2e/flow_field-after.png
+# Unpaused: the replay goes on from where it was.
+console pause
+frames 15
+expect clock.count 86