diff options
Diffstat (limited to 'examples/noc/test/noise_walker.script')
| -rw-r--r-- | examples/noc/test/noise_walker.script | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/noc/test/noise_walker.script b/examples/noc/test/noise_walker.script new file mode 100644 index 0000000..b15c60a --- /dev/null +++ b/examples/noc/test/noise_walker.script @@ -0,0 +1,22 @@ +# One second of the walk, saved; four more; then the snapshot loads back. +# The trail is an offscreen image in Session, so the load (`in.jumped`) +# repaints it up to the loaded step: the screenshot shows two seconds of +# trail, not six, and equals a straight two-second run's. +frames 60 +console save 1 +expect clock.count 60 +expect walker.x 422.59 ~0.01 +expect walker.y 187.75 ~0.01 +frames 240 +console load 1 +expect clock.count 60 +frames 60 +expect clock.count 120 +screenshot .zig-cache/e2e/noise_walker.png +console reset +# The console line's frame takes the first step. +expect clock.count 1 +frames 119 +expect clock.count 120 +screenshot .zig-cache/e2e/noise_walker-straight.png +expect-same-screenshot .zig-cache/e2e/noise_walker.png .zig-cache/e2e/noise_walker-straight.png |
