diff options
Diffstat (limited to 'test/w3c/lua/test280.scxml')
-rw-r--r-- | test/w3c/lua/test280.scxml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/w3c/lua/test280.scxml b/test/w3c/lua/test280.scxml new file mode 100644 index 0000000..e7cd5b1 --- /dev/null +++ b/test/w3c/lua/test280.scxml @@ -0,0 +1,25 @@ +<?xml version="1.0" standalone="no"?> +<!-- test late binding. var2 won't get bound until s1 is entered, so it shouldn't have a value in s0 and +accessing it should cause an error. It should get bound before the onentry code in s1 so it should be +possible access it there and assign its value to var1 --> +<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" binding="late" datamodel="lua"> + <datamodel> + <data id="testvar1"/> + </datamodel> + <state id="s0"> + <transition target="s1" cond="testvar2==nil"/> + <transition target="fail"/> + </state> + <state id="s1"> + <datamodel> + <data expr="1" id="testvar2"/> + </datamodel> + <onentry> + <assign expr="testvar2" location="testvar1"/> + </onentry> + <transition cond="testvar1==testvar2" target="pass"/> + <transition target="fail"/> + </state> + <final id="pass"/> + <final id="fail"/> +</scxml> |