From d596b6a105e0baba3d908eb90a2e0705ab85b6b6 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Fri, 3 Mar 2023 00:10:48 -0500 Subject: Add `After` and `Commit` and a test See https://discord.com/channels/956758212152025098/1055633077323436103/1081080378644758608 --- test/commit.tcl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/commit.tcl (limited to 'test/commit.tcl') 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 -- cgit v1.2.3