summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/past.script8
-rw-r--r--test/past_diverged.script6
-rw-r--r--test/past_replay.script12
3 files changed, 26 insertions, 0 deletions
diff --git a/test/past.script b/test/past.script
new file mode 100644
index 0000000..8ac9c25
--- /dev/null
+++ b/test/past.script
@@ -0,0 +1,8 @@
+# Session 0 of test-past (see build.zig): pointer driven, a mark at frame
+# 30, a jump (`set`) at frame 60, 300 frames in all.
+move 300 200
+frames 29
+console save probe
+frames 29
+console set velocity[0] 5
+frames 240
diff --git a/test/past_diverged.script b/test/past_diverged.script
new file mode 100644
index 0000000..6d275a2
--- /dev/null
+++ b/test/past_diverged.script
@@ -0,0 +1,6 @@
+# Session 0, replayed by a build whose pointer chase differs: it diverges
+# before the mark and is put back on it.
+console play session 0
+expect-log was built from
+frames 40
+expect-log diverged before frame 30
diff --git a/test/past_replay.script b/test/past_replay.script
new file mode 100644
index 0000000..0f11c64
--- /dev/null
+++ b/test/past_replay.script
@@ -0,0 +1,12 @@
+# Session 0 again, by the same build: from its start, half a second in is
+# the mark's State exactly; two seconds in, from the jump's keyframe, is
+# frame 120's.
+console play session 0
+console seek 499
+expect-snapshot probe
+expect-no-log diverged
+console play session 0 at 2
+expect updates 121
+console pause
+frames 30
+expect-no-log diverged