summaryrefslogtreecommitdiff
path: root/test/reload.script
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-25 21:47:58 -0300
committerGabriel Schneider <[email protected]>2026-09-25 21:48:16 -0300
commit9c33714591a2147f7e5879e77212ca9886d0c967 (patch)
treed250be9d9bc365d7894d49455c0f6376966b58be /test/reload.script
downloadsketchbook-9c33714591a2147f7e5879e77212ca9886d0c967.tar.gz
sketchbook-9c33714591a2147f7e5879e77212ca9886d0c967.zip
Put the game first: lib/sketchbook, sketches/vecanim
The root is the game. The platform library moves to lib/sketchbook (with serve_web.py, which serves any sketch's web build, as a tool of it), and vecanim to sketches/vecanim, still its own package on the same library.
Diffstat (limited to 'test/reload.script')
-rw-r--r--test/reload.script18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/reload.script b/test/reload.script
new file mode 100644
index 0000000..863ecc6
--- /dev/null
+++ b/test/reload.script
@@ -0,0 +1,18 @@
+# The counter sketch reloads with a changed layout and keeps its values.
+click 10 10
+click 10 10
+expect clicks 2
+expect label warm
+console snapshot 3
+console save
+load {v2}
+expect clicks 2
+expect label warm
+expect streak 7
+click 10 10
+expect clicks 12
+# The snapshot was migrated with the live state.
+console load 3
+expect clicks 2
+console set streak 9
+expect streak 9