summaryrefslogtreecommitdiffstats
path: root/test/commit.tcl
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2023-03-03 05:10:48 +0000
committerOmar Rizwan <omar@omar.website>2023-03-03 05:12:03 +0000
commitd596b6a105e0baba3d908eb90a2e0705ab85b6b6 (patch)
tree2a4bf45ed1839c3ea1d2b5cb813e1a2a9d9c6c1e /test/commit.tcl
parentAdd `folk-ian` host (diff)
downloadfolk-d596b6a105e0baba3d908eb90a2e0705ab85b6b6.tar.gz
folk-d596b6a105e0baba3d908eb90a2e0705ab85b6b6.zip
Add `After` and `Commit` and a test
See https://discord.com/channels/956758212152025098/1055633077323436103/1081080378644758608
Diffstat (limited to 'test/commit.tcl')
-rw-r--r--test/commit.tcl14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/commit.tcl b/test/commit.tcl
new file mode 100644
index 00000000..745aa5bd
--- /dev/null
+++ b/test/commit.tcl
@@ -0,0 +1,14 @@
+Assert programBall has program code {
+ Commit { Claim there is a ball at x 100 y 100 }
+
+ When there is a ball at x /x/ y /y/ {
+ puts "ball at $x $y"
+ After 10 milliseconds {
+ Commit { Claim there is a ball at x $x y [expr {$y+1}] }
+ if {$y > 115} { set ::done true }
+ }
+ }
+}
+Step
+
+vwait ::done