summaryrefslogtreecommitdiffstats
path: root/test/samples/w3c
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-05 12:24:46 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-05 12:24:46 (GMT)
commit48009e6bafca54d117bee81ea2a8b41f2aae1d70 (patch)
treee791f120ce5de86484c8fb3c3d5bc2163e8773d0 /test/samples/w3c
parent5a7c8fd646d77139f216755085e1252a1dee334d (diff)
downloaduscxml-48009e6bafca54d117bee81ea2a8b41f2aae1d70.zip
uscxml-48009e6bafca54d117bee81ea2a8b41f2aae1d70.tar.gz
uscxml-48009e6bafca54d117bee81ea2a8b41f2aae1d70.tar.bz2
Redownloaded tests and fixed some more w3c issues
Diffstat (limited to 'test/samples/w3c')
-rw-r--r--test/samples/w3c/tests/test153.scxml2
-rw-r--r--test/samples/w3c/tests/test224.scxml4
-rw-r--r--test/samples/w3c/tests/test226.scxml2
-rw-r--r--test/samples/w3c/tests/test301.scxml2
-rw-r--r--test/samples/w3c/tests/test302.scxml2
-rw-r--r--test/samples/w3c/tests/test303.scxml2
-rw-r--r--test/samples/w3c/tests/test304.scxml2
-rw-r--r--test/samples/w3c/tests/test307.scxml2
-rw-r--r--test/samples/w3c/tests/test321.scxml2
-rw-r--r--test/samples/w3c/tests/test322.scxml7
-rw-r--r--test/samples/w3c/tests/test323.scxml2
-rw-r--r--test/samples/w3c/tests/test330.scxml6
-rw-r--r--test/samples/w3c/tests/test403c.scxml2
-rw-r--r--test/samples/w3c/tests/test539.txt4
-rw-r--r--test/samples/w3c/tests/test540.txt3
-rw-r--r--test/samples/w3c/tests/test552.txt2
-rw-r--r--test/samples/w3c/txml/test216sub1.txml.19
-rw-r--r--test/samples/w3c/txml/test277.txml32
-rw-r--r--test/samples/w3c/txml/test561.txml4
-rw-r--r--test/samples/w3c/txml/test568.txml19
-rwxr-xr-xtest/samples/w3c/update-txml.sh3
21 files changed, 78 insertions, 35 deletions
diff --git a/test/samples/w3c/tests/test153.scxml b/test/samples/w3c/tests/test153.scxml
index c904232..9917789 100644
--- a/test/samples/w3c/tests/test153.scxml
+++ b/test/samples/w3c/tests/test153.scxml
@@ -13,7 +13,7 @@ it ever isn't, set Var4 to 0, indicating failure --><scxml xmlns="http://www.w3.
<state id="s0">
<onentry>
<foreach item="Var2" array="Var3">
- <if cond="Var1 &lt;Var2">
+ <if cond="Var1/text() &lt;Var2/text() ">
<assign location="Var1" expr="Var2"/>
<else/>
<!-- values are out of order, record failure -->
diff --git a/test/samples/w3c/tests/test224.scxml b/test/samples/w3c/tests/test224.scxml
index 585d014..e2e8a32 100644
--- a/test/samples/w3c/tests/test224.scxml
+++ b/test/samples/w3c/tests/test224.scxml
@@ -22,9 +22,7 @@
<state id="s1">
<transition cond="(function(str, starts){if (starts === '') return true;if (str == null || starts == null) return false;str = String(str); starts = String(starts);return str.length &gt;= starts.length &amp;&amp; str.slice(0, starts.length) === starts;})(Var1, Var2)" target="pass"/>
- <transition target="fail">
- <log expr="Var1"/>
- </transition>
+ <transition target="fail"/>
</state>
<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
diff --git a/test/samples/w3c/tests/test226.scxml b/test/samples/w3c/tests/test226.scxml
index e1c6d3f..c831a1d 100644
--- a/test/samples/w3c/tests/test226.scxml
+++ b/test/samples/w3c/tests/test226.scxml
@@ -9,7 +9,7 @@ success. otherwise it will hang and the timeout in this doc signifies failure.
</onentry>
- <invoke type="http://www.w3.org/TR/scxml/" src="file:test226sub1.scxml">
+ <invoke type="http://www.w3.org/TR/scxml/" src="file:test226sub1.txml">
<param name="Var1" expr="1"/>
</invoke>
diff --git a/test/samples/w3c/tests/test301.scxml b/test/samples/w3c/tests/test301.scxml
index 1c25c6d..59125c8 100644
--- a/test/samples/w3c/tests/test301.scxml
+++ b/test/samples/w3c/tests/test301.scxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!-- the processor should reject this document because it can't download the script.
-Therefore we fail if it runs at all. This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0">
+Therefore we fail if it runs at all. This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0">
<script src="D:\foo"/>
<state id="s0">
diff --git a/test/samples/w3c/tests/test302.scxml b/test/samples/w3c/tests/test302.scxml
index 21ccdb3..c72a311 100644
--- a/test/samples/w3c/tests/test302.scxml
+++ b/test/samples/w3c/tests/test302.scxml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><!-- test that a script is evaluated at load time. <conf:script> shoudl assign the value 1 to
Var1. Hence, if script is evaluated at download time, Var1 has a value in the initial state s0.
-This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" datamodel="ecmascript" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0">
+This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0">
<script>var Var1 = 1</script>
<state id="s0">
diff --git a/test/samples/w3c/tests/test303.scxml b/test/samples/w3c/tests/test303.scxml
index 2fa5b27..dcb3490 100644
--- a/test/samples/w3c/tests/test303.scxml
+++ b/test/samples/w3c/tests/test303.scxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><!-- 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" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0">
+right point. This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0">
<datamodel>
<data id="Var1" expr="0"/>
</datamodel>
diff --git a/test/samples/w3c/tests/test304.scxml b/test/samples/w3c/tests/test304.scxml
index 250d0cd..cdb4c22 100644
--- a/test/samples/w3c/tests/test304.scxml
+++ b/test/samples/w3c/tests/test304.scxml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that a variable declared by a script can be accessed like any other part of the data model --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0">
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a variable declared by a script can be accessed like any other part of the data model --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0">
<script>var Var1 = 1</script>
<state id="s0">
diff --git a/test/samples/w3c/tests/test307.scxml b/test/samples/w3c/tests/test307.scxml
index 6eff148..3f93f10 100644
--- a/test/samples/w3c/tests/test307.scxml
+++ b/test/samples/w3c/tests/test307.scxml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0" binding="late">
+<?xml version="1.0" encoding="UTF-8"?><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" binding="late">
<!-- with binding=late, in s0 we access a variable that isn't created until we get to s1. Then in s1
we access a non-existent substructure of a variable. We use log tags to report the values that both operations
diff --git a/test/samples/w3c/tests/test321.scxml b/test/samples/w3c/tests/test321.scxml
index 66fcf58..fe70937 100644
--- a/test/samples/w3c/tests/test321.scxml
+++ b/test/samples/w3c/tests/test321.scxml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><!-- test that _sessionid is bound on startup --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0" name="machineName">
<datamodel>
- <data id="Var1" expr="_sessionid"/>
+ <data id="Var1" expr="$_sessionid"/>
</datamodel>
<state id="s0">
diff --git a/test/samples/w3c/tests/test322.scxml b/test/samples/w3c/tests/test322.scxml
index 2c7f536..2d0fee1 100644
--- a/test/samples/w3c/tests/test322.scxml
+++ b/test/samples/w3c/tests/test322.scxml
@@ -12,9 +12,7 @@ be assigned to --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="ht
<state id="s1">
<onentry>
- <log expr="_sessionid" />
<assign location="_sessionid" expr="'otherName'"/>
- <log expr="_sessionid" />
<raise event="foo"/>
</onentry>
@@ -25,10 +23,7 @@ be assigned to --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="ht
<state id="s2">
<transition cond="Var1==_sessionid" target="pass"/>
- <transition target="fail">
- <log expr="_sessionid" />
- <log expr="Var1" />
- </transition>
+ <transition target="fail"/>
</state>
diff --git a/test/samples/w3c/tests/test323.scxml b/test/samples/w3c/tests/test323.scxml
index 43fa9c8..01ca4cb 100644
--- a/test/samples/w3c/tests/test323.scxml
+++ b/test/samples/w3c/tests/test323.scxml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><!-- test that _name is bound on startup --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript" name="machineName">
<datamodel>
- <data id="Var1" expr="_name"/>
+ <data id="Var1" expr="$_name"/>
</datamodel>
<state id="s0">
diff --git a/test/samples/w3c/tests/test330.scxml b/test/samples/w3c/tests/test330.scxml
index 5488f96..5cbf4bc 100644
--- a/test/samples/w3c/tests/test330.scxml
+++ b/test/samples/w3c/tests/test330.scxml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" name="machineName">
+<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" name="machineName">
<state id="s0">
<onentry>
@@ -17,7 +17,7 @@
</state>
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+ <final xmlns="http://www.w3.org/2005/07/scxml" id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final xmlns="http://www.w3.org/2005/07/scxml" id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test403c.scxml b/test/samples/w3c/tests/test403c.scxml
index c02425d..9e7fd12 100644
--- a/test/samples/w3c/tests/test403c.scxml
+++ b/test/samples/w3c/tests/test403c.scxml
@@ -6,7 +6,7 @@
<state id="s0" initial="p0">
<onentry>
<raise event="event1"/>
- <send event="timeout" delay="100s"/>
+ <send event="timeout" delay="1s"/>
</onentry>
<transition event="event2" target="fail"/>
<transition event="timeout" target="fail"/>
diff --git a/test/samples/w3c/tests/test539.txt b/test/samples/w3c/tests/test539.txt
new file mode 100644
index 0000000..de1b0a1
--- /dev/null
+++ b/test/samples/w3c/tests/test539.txt
@@ -0,0 +1,4 @@
+ <books xmlns="">
+ <book title="title1"/>
+ <book title="title2"/>
+ </books> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test540.txt b/test/samples/w3c/tests/test540.txt
new file mode 100644
index 0000000..2191239
--- /dev/null
+++ b/test/samples/w3c/tests/test540.txt
@@ -0,0 +1,3 @@
+123
+4 5
+ \ No newline at end of file
diff --git a/test/samples/w3c/tests/test552.txt b/test/samples/w3c/tests/test552.txt
index 0cfbf08..d8263ee 100644
--- a/test/samples/w3c/tests/test552.txt
+++ b/test/samples/w3c/tests/test552.txt
@@ -1 +1 @@
-2
+2 \ No newline at end of file
diff --git a/test/samples/w3c/txml/test216sub1.txml.1 b/test/samples/w3c/txml/test216sub1.txml.1
deleted file mode 100644
index eb4c9df..0000000
--- a/test/samples/w3c/txml/test216sub1.txml.1
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
-
-
-<scxml initial="final" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
-
-<final id="final"/>
-
-</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test277.txml b/test/samples/w3c/txml/test277.txml
new file mode 100644
index 0000000..bd08341
--- /dev/null
+++ b/test/samples/w3c/txml/test277.txml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<!-- test that platform creates undound variable if we assign an illegal value to it. Thus
+ we can assign to it later in state s1. -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel="" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:illegalExpr=""/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+
+ <transition event="error.execution" conf:unboundVar="1" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign conf:location="1" conf:expr="1"/>
+ </onentry>
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test561.txml b/test/samples/w3c/txml/test561.txml
index 221145c..4b7ec8e 100644
--- a/test/samples/w3c/txml/test561.txml
+++ b/test/samples/w3c/txml/test561.txml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
- <!-- in the ECMA data model, test that processor creates correct DOM structure in
- _event.data when receiving XML in an event -->
+ <!-- in the ECMA data model, test that processor creates an ECMAScript object
+ _event.data when receiving JSON in an event -->
<scxml xmlns="http://www.w3.org/2005/07/scxml"
xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
diff --git a/test/samples/w3c/txml/test568.txml b/test/samples/w3c/txml/test568.txml
new file mode 100644
index 0000000..ab00644
--- /dev/null
+++ b/test/samples/w3c/txml/test568.txml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!-- test that location field is found inside entry for SCXML Event I/O processor in the XPath
+data model. The tests for the relevant event i/o processors will test that it can be used to
+send events. -->
+
+<scxml initial="s0" version="1.0" datamodel="xpath" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <transition cond="$_ioprocessors/scxml/location/text()" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/update-txml.sh b/test/samples/w3c/update-txml.sh
index dab3cf3..6cf9c01 100755
--- a/test/samples/w3c/update-txml.sh
+++ b/test/samples/w3c/update-txml.sh
@@ -1,4 +1,5 @@
#!/bin/bash
-wget -rl1 http://www.w3.org/Voice/2013/scxml-irp/
+wget -rl1 -Atxml,txt http://www.w3.org/Voice/2013/scxml-irp/
find ./www.w3.org -name *.txml -exec cp {} ./txml \;
+find ./www.w3.org -name *.txt -exec cp {} ./txml \;
rm -rf www.w3.org \ No newline at end of file