summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-04-26 16:28:10 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-04-26 16:28:10 (GMT)
commit3a7350b931705b2ab3aa6f1516512e37038e9899 (patch)
tree2437b9dd1fae15e947b2de5b757c77947fb341ab /test
parent199d27c0f613e54369865ad73ffcb523ee8930fd (diff)
downloaduscxml-3a7350b931705b2ab3aa6f1516512e37038e9899.zip
uscxml-3a7350b931705b2ab3aa6f1516512e37038e9899.tar.gz
uscxml-3a7350b931705b2ab3aa6f1516512e37038e9899.tar.bz2
Fixed issue110
Diffstat (limited to 'test')
-rw-r--r--test/issues/test-issue109.scxml17
-rw-r--r--test/issues/test-issue110.scxml42
2 files changed, 59 insertions, 0 deletions
diff --git a/test/issues/test-issue109.scxml b/test/issues/test-issue109.scxml
new file mode 100644
index 0000000..bb366dd
--- /dev/null
+++ b/test/issues/test-issue109.scxml
@@ -0,0 +1,17 @@
+<scxml datamodel="lua" initial="StateShape1" name="ScxmlShape1" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
+ <datamodel>
+ <data id="VarArray">{ 0, 0, 0 }</data>
+ <data expr="1" id="Var1"/>
+ </datamodel>
+ <state id="StateShape1">
+ <onentry>
+ <assign expr="555" location="VarArray[Var1]"/>
+ </onentry>
+ <transition cond="VarArray[1]~=0" target="Pass"/>
+ <transition event="error.*" target="Fail"/>
+ <transition cond="VarArray[1]==0" target="Unknown"/>
+ </state>
+ <final id="Pass"/>
+ <final id="Fail"/>
+ <final id="Unknown"/>
+</scxml>
diff --git a/test/issues/test-issue110.scxml b/test/issues/test-issue110.scxml
new file mode 100644
index 0000000..4d50324
--- /dev/null
+++ b/test/issues/test-issue110.scxml
@@ -0,0 +1,42 @@
+<scxml datamodel="lua" initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
+ <datamodel>
+ <data expr="1" id="Var1"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <send delay="2000" event="timeout" xmlns:scxml="http://www.w3.org/2005/07/scxml"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml datamodel="lua" initial="sub0" name="ScxmlShape1" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
+ <datamodel>
+ <data expr="555" id="VarXXX"/>
+ </datamodel>
+ <final id="subFinal"/>
+ <state id="sub0">
+ <transition cond="Var1==1" target="subFinal">
+ <log expr="Var1" label="Var1 is supposed to be out of scope" />
+ <send target="#_parent" event="failure"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ </state>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" cond="not VarXXX" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass" xmlns:scxml="http://www.w3.org/2005/07/scxml">
+ <onentry>
+ <log expr="'pass'" label="Outcome"/>
+ <log expr="VarXXX" label="We mustn't see VarXXX here"/>
+ </onentry>
+ </final>
+ <final id="fail" xmlns:scxml="http://www.w3.org/2005/07/scxml">
+ <onentry>
+ <log expr="'fail'" label="Outcome"/>
+ </onentry>
+ </final>
+</scxml>