summaryrefslogtreecommitdiffstats
path: root/test/w3c/lua/test303.scxml
diff options
context:
space:
mode:
Diffstat (limited to 'test/w3c/lua/test303.scxml')
-rw-r--r--test/w3c/lua/test303.scxml18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/w3c/lua/test303.scxml b/test/w3c/lua/test303.scxml
new file mode 100644
index 0000000..88f79b0
--- /dev/null
+++ b/test/w3c/lua/test303.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- to test that scripts are run as part of executable content, we check that it changes the value of a var at the
+right point. This test is valid only for datamodels that support scripting -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="s0" datamodel="lua">
+ <datamodel>
+ <data expr="0" id="testvar1"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign expr="2" location="testvar1"/>
+ <script>testvar1 = 1</script>
+ </onentry>
+ <transition cond="testvar1 == 1" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass"/>
+ <final id="fail"/>
+</scxml>