diff options
Diffstat (limited to 'examples/noc/test/pendulum.reload.script')
| -rw-r--r-- | examples/noc/test/pendulum.reload.script | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/noc/test/pendulum.reload.script b/examples/noc/test/pendulum.reload.script new file mode 100644 index 0000000..292cbfc --- /dev/null +++ b/examples/noc/test/pendulum.reload.script @@ -0,0 +1,26 @@ +# Live reload keeps State: swing, pause a replay so nothing moves, load the +# edited build ({v2}: a light bob), check State carried over and only the +# drawing changed, then play on. +frames 30 +console record 0 +frames 30 +console stop +console play 0 +frames 10 +console pause +frames 2 +expect clock.count 40 +expect angle -0.1696 ~0.001 +screenshot .zig-cache/e2e/pendulum-before.png +frames 1 +load {v2} +expect clock.count 40 +expect angle -0.1696 ~0.001 +frames 2 +screenshot .zig-cache/e2e/pendulum-after.png +frames 1 +expect-different-screenshot .zig-cache/e2e/pendulum-before.png .zig-cache/e2e/pendulum-after.png +# Unpaused: the replay goes on from where it was. +console pause +frames 20 +expect clock.count 60 |
