diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-03 21:21:24 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-03 21:21:24 (GMT) |
commit | 50174e88cd7ccbaa455bc40bd214ae494378a7cc (patch) | |
tree | be0e7707b704757105084141dd6e31109be53719 /test/w3c | |
parent | 67f8e8b4106eb20ce0bc01fd840b0d8e4319cb36 (diff) | |
download | uscxml-50174e88cd7ccbaa455bc40bd214ae494378a7cc.zip uscxml-50174e88cd7ccbaa455bc40bd214ae494378a7cc.tar.gz uscxml-50174e88cd7ccbaa455bc40bd214ae494378a7cc.tar.bz2 |
Removed w3c ecma tests from xpath and vice versa
Diffstat (limited to 'test/w3c')
56 files changed, 13 insertions, 1212 deletions
diff --git a/test/w3c/confEcma.xsl b/test/w3c/confEcma.xsl index a77d552..41a8129 100644 --- a/test/w3c/confEcma.xsl +++ b/test/w3c/confEcma.xsl @@ -275,7 +275,7 @@ events which cause the test to fail. The default value provided here is pretty <!-- this produces a reference to an invalid namelist, i.e. on that should cause an error --> <xsl:template match="//@conf:invalidNamelist"> - <xsl:attribute name="namelist">"foo"</xsl:attribute> + <xsl:attribute name="namelist">"foo</xsl:attribute> </xsl:template> diff --git a/test/w3c/convert-tests.sh b/test/w3c/convert-tests.sh index 42f8fce..a8357aa 100755 --- a/test/w3c/convert-tests.sh +++ b/test/w3c/convert-tests.sh @@ -20,4 +20,7 @@ do done cp txml/*.txt ecma/ -cp txml/*.txt xpath/
\ No newline at end of file +cp txml/*.txt xpath/ + +find ./ecma -type f -exec grep -Ili 'datamodel="xpath"' {} \; |xargs rm -fv +find ./xpath -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv
\ No newline at end of file diff --git a/test/w3c/ecma/test252.scxml b/test/w3c/ecma/test252.scxml index b33342b..14c6686 100644 --- a/test/w3c/ecma/test252.scxml +++ b/test/w3c/ecma/test252.scxml @@ -5,7 +5,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <state id="s0" initial="s01"> <onentry> - <send event="timeout" delayexpr="'50ms'"/> + <send event="timeout" delay="2s"/> </onentry> <transition event="timeout" target="pass"/> @@ -22,7 +22,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <scxml initial="sub0" version="1.0" datamodel="ecmascript"> <state id="sub0"> <onentry> - <send event="timeout" delayexpr="'25ms'"/> + <send event="timeout" delay="2s"/> </onentry> <transition event="timeout" target="subFinal"/> <onexit> diff --git a/test/w3c/ecma/test463.scxml b/test/w3c/ecma/test463.scxml deleted file mode 100644 index 4f32b84..0000000 --- a/test/w3c/ecma/test463.scxml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that the <data> tag creates an element in the XML datamodel with the correct name and id attr -and binds an XPath variable to it --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> -<datamodel> - <data id="foo" expr="2"/> - </datamodel> - -<state id="s0"> - - - <transition cond="local-name($foo)='data'and $foo/@id ='foo'" target="pass"/> - <transition target="fail"/> - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test464.scxml b/test/w3c/ecma/test464.scxml deleted file mode 100644 index bd640f2..0000000 --- a/test/w3c/ecma/test464.scxml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that an unassigned variable creates an empty <data> element --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> -<datamodel> - <data id="foo"/> - </datamodel> - -<state id="s0"> - - - <transition cond="count($foo) = 1 and count($foo/*) = 0" target="pass"/> - <transition target="fail"/> - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test465.scxml b/test/w3c/ecma/test465.scxml deleted file mode 100644 index a91bb06..0000000 --- a/test/w3c/ecma/test465.scxml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that all xpath variables are in a single global scope--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> -<datamodel> - <data id="foo" expr="2"/> - </datamodel> - -<state id="s0"> - <transition cond="count($foo) = 1 and count($bar) = 1" target="s1"/> - <transition target="fail"/> - </state> - - -<state id="s1"> - <datamodel> - <data id="bar" expr="1"/> - </datamodel> - <transition target="pass"/> - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test466.scxml b/test/w3c/ecma/test466.scxml deleted file mode 100644 index 1431fab..0000000 --- a/test/w3c/ecma/test466.scxml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that xpath expressions are converted to boolean when used as conditional expressions--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> -<datamodel> - <data id="foo" expr="2"/> - </datamodel> - -<state id="s0"> - <transition cond="$foo" target="pass"/> - <transition target="fail"/> - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test467.scxml b/test/w3c/ecma/test467.scxml deleted file mode 100644 index 130b7bc..0000000 --- a/test/w3c/ecma/test467.scxml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that in() is available --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - - -<state id="s0"> - <transition cond="In('s0')" target="pass"/> - <transition target="fail"/> - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test468.scxml b/test/w3c/ecma/test468.scxml deleted file mode 100644 index 3b6902d..0000000 --- a/test/w3c/ecma/test468.scxml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that XPath expressions can be used as location expressions. - This example is taken from the spec --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cities"> - <list xmlns=""> - <city id="nyc" count="0">New York</city> - <city id="bos" count="0">Boston</city> - </list> - </data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cities/list/city[@id='nyc']/@count" expr="1"/> - </onentry> - <transition cond="$cities/list/city[@id='nyc']/@count = 1" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test469.scxml b/test/w3c/ecma/test469.scxml deleted file mode 100644 index 02fe476..0000000 --- a/test/w3c/ecma/test469.scxml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that XPath expressions can be used as value expressions. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="copyOfEventData"/> - </datamodel> - -<state id="s0"> - <onentry> - <send event="event1"> - <param name="param1" expr="1"/> - </send> - </onentry> - <transition event="event1" target="s1"> - <assign location="$copyOfEventData" expr="$_event/data"/> - </transition> - </state> - -<state id="s1"> - <transition cond="$copyOfEventData/data/data[@id='param1'] =1" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test470.scxml b/test/w3c/ecma/test470.scxml deleted file mode 100644 index 3c26bb1..0000000 --- a/test/w3c/ecma/test470.scxml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that the processor makes a deep copy of a node set when assigning. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="var1"> - <foo xmlns=""> - <bar>2</bar> - </foo> - </data> - <data id="var2"/> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$var2" expr="$var1/foo"/> - <assign location="$var1/foo/bar" expr="3"/> - </onentry> - <transition cond="$var2/foo/bar=2" target="pass"/> - <transition target="fail"/> - </state> - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test473.scxml b/test/w3c/ecma/test473.scxml deleted file mode 100644 index 4a57129..0000000 --- a/test/w3c/ecma/test473.scxml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'replacechildren' in <assign> replaces all children with the new value. - This example is taken from the doc --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book[1]"> - <bookinfo xmlns=""> - <isdn>12334455</isdn> - <author>some author</author> - </bookinfo> -</assign> - </onentry> - <transition cond="$cart/myCart/books/book[1]/bookinfo/isdn/text() = '12334455' and not($cart/myCart/books/book[1]/title)" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test474.scxml b/test/w3c/ecma/test474.scxml deleted file mode 100644 index decad75..0000000 --- a/test/w3c/ecma/test474.scxml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'firstchild' in <assign> inserts the new value before the other children. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book[1]" type="firstchild"> - <bookinfo xmlns=""> - <isdn>12334455</isdn> - <author>some author</author> - </bookinfo> -</assign> - </onentry> - <transition cond="$cart/myCart/books/book[1]/*[1]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[2]/text() = 'The Zen Mind'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test475.scxml b/test/w3c/ecma/test475.scxml deleted file mode 100644 index 0f9cdfe..0000000 --- a/test/w3c/ecma/test475.scxml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'lastchild' in <assign> inserts the new value after the other children. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book[1]" type="lastchild"> - <bookinfo xmlns=""> - <isdn>12334455</isdn> - <author>some author</author> - </bookinfo> -</assign> - </onentry> - <transition cond="$cart/myCart/books/book[1]/*[2]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[1]/text() = 'The Zen Mind'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test476.scxml b/test/w3c/ecma/test476.scxml deleted file mode 100644 index d3fe8e8..0000000 --- a/test/w3c/ecma/test476.scxml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'nextsibling' in <assign> inserts the new value after the location. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book[1]/title" type="nextsibling"> - <bookinfo xmlns=""> - <isdn>12334455</isdn> - <author>some author</author> - </bookinfo> -</assign> - </onentry> - <transition cond="$cart/myCart/books/book[1]/*[2]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[1]/text() = 'The Zen Mind'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test477.scxml b/test/w3c/ecma/test477.scxml deleted file mode 100644 index 1726866..0000000 --- a/test/w3c/ecma/test477.scxml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'previoussibling' in <assign> inserts the new value before the location. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book[1]/title" type="previoussibling"> - <bookinfo xmlns=""> - <isdn>12334455</isdn> - <author>some author</author> - </bookinfo> -</assign> - </onentry> - <transition cond="$cart/myCart/books/book[1]/*[1]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[2]/text() = 'The Zen Mind'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test478.scxml b/test/w3c/ecma/test478.scxml deleted file mode 100644 index 9821608..0000000 --- a/test/w3c/ecma/test478.scxml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'replace' in <assign> replaces the value at the location. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book[2]" type="replace"> - <cd xmlns=""> - <title>This is not a book</title> - </cd> -</assign> - </onentry> - - <transition cond="$cart/myCart/books/cd/title = 'This is not a book'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test479.scxml b/test/w3c/ecma/test479.scxml deleted file mode 100644 index 3d5b1ac..0000000 --- a/test/w3c/ecma/test479.scxml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'delete' in <assign> deletes the value at the location. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/cds" type="delete"> - <cd xmlns=""> - <title>This is not a book</title> - </cd> -</assign> - </onentry> - - <transition cond="not($cart/myCart/cds)" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test480.scxml b/test/w3c/ecma/test480.scxml deleted file mode 100644 index 0fde260..0000000 --- a/test/w3c/ecma/test480.scxml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that 'addattr' in <assign> adds an attribute to the specified node. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book[1]" type="addattribute" attr="author" expr="'somebody'"/> - </onentry> - - <transition cond="$cart/myCart/books/book[1]/@author = 'somebody'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test481.scxml b/test/w3c/ecma/test481.scxml deleted file mode 100644 index a0505f6..0000000 --- a/test/w3c/ecma/test481.scxml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that illegal assignments fail and have no side effects. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <send event="timeout" delay="3s"/> - <assign location="$cart/myCart/cds/cd/@name"> - <foo> - <bar/> - </foo> -</assign> - </onentry> - - <transition event="error.execution" cond="$cart/myCart/cds/cd/@name = 'Something'" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test482.scxml b/test/w3c/ecma/test482.scxml deleted file mode 100644 index 00eb3fe..0000000 --- a/test/w3c/ecma/test482.scxml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that system vars are created and bound to XPath variables --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath"> - - -<state id="s0"> - <onentry> - <!-- event isn't bound until an event is raised --> - <raise event="someevent"/> - </onentry> - <transition event="*" cond="local-name($_event) = 'data' and local-name($_sessionid) = 'data' and local-name($_name) = 'data' and local-name($_ioprocessors) = 'data'" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test483.scxml b/test/w3c/ecma/test483.scxml deleted file mode 100644 index 0a1b236..0000000 --- a/test/w3c/ecma/test483.scxml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach works correctly, iterating over node set in document order. - This tests assertions 483-485 --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="var1"> - <nodes xmlns=""> - <node/> - <node/> - <node/> - </nodes> - </data> - </datamodel> - -<state id="s0"> - <onentry> - <foreach array="$var1/nodes/node" item="item" index="pos"> - <assign location="$item" type="addattribute" attr="position" expr="$pos"/> - </foreach> - </onentry> - - <transition cond="$var1/nodes/node[1]/@position = 1 and $var1/nodes/node[2]/@position = 2 and $var1/nodes/node[3]/@position = 3" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test537.scxml b/test/w3c/ecma/test537.scxml deleted file mode 100644 index 350d422..0000000 --- a/test/w3c/ecma/test537.scxml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that the root element of the datamodel is <datamodel> and that <data> elements are its -children--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> -<datamodel> - <data id="foo" expr="2"/> - </datamodel> - -<state id="s0"> - - - <transition cond="local-name($foo/..)='datamodel'" target="pass"/> - <transition target="fail"/> - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test539.scxml b/test/w3c/ecma/test539.scxml deleted file mode 100644 index 450bfd9..0000000 --- a/test/w3c/ecma/test539.scxml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that if the child of <data> is XML, or if XML is loaded via src=, the processor - assigns it as the value of the var --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="var1"> - <books xmlns=""> - <book title="title1"/> - <book title="title2"/> - </books> -</data> - <data id="var2" src="file:test539.txt"/> - </datamodel> - -<state id="s0"> - <transition cond="$var1/books/book[2]/@title = 'title2'" target="s1"/> - <transition target="fail"/> - </state> - -<state id="s1"> - <transition cond="$var2/books/book[2]/@title = 'title2'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test540.scxml b/test/w3c/ecma/test540.scxml deleted file mode 100644 index 641509f..0000000 --- a/test/w3c/ecma/test540.scxml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that if the child of <data> is a string or if a string is loaded via src=, the processor - does white space normalization on it and assigns it as the value of the var --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="var1">123 -4 5 -</data> - <data id="var2" src="file:test540.txt"/> - </datamodel> - -<state id="s0"> - <onentry> - <log label="var1 " expr="$var1"/> - </onentry> - <transition cond="$var1 = '123 4 5' and $var2 = '123 4 5'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test542.scxml b/test/w3c/ecma/test542.scxml deleted file mode 100644 index 1101471..0000000 --- a/test/w3c/ecma/test542.scxml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that <content> inside <donedata> handles XML and strings, - including white space normalization. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - -<state id="s0" initial="s01"> - <transition event="done.state.s0" cond="$_event/data/books/book[1]/@title = 'title1'" target="s1"/> - <transition event="done" target="fail"/> - <final id="s01"> - <donedata> - <content> - <books xmlns=""> - <book title="title1"/> - <book title="title2"/> - </books> - </content> - </donedata> - </final> - </state> - -<state id="s1" initial="s11"> - <transition event="done.state.s1" cond="$_event/data = '123 4 5'" target="pass"/> - <transition event="done" target="fail"/> - <final id="s11"> - <donedata> - <content>123 -4 5 - </content> - </donedata> - </final> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test543.scxml b/test/w3c/ecma/test543.scxml deleted file mode 100644 index 2c5c6de..0000000 --- a/test/w3c/ecma/test543.scxml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that event fields are present as children of _event --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath"> - - -<state id="s0"> - <onentry> - <!-- event isn't bound until an event is raised --> - <raise event="someevent"/> - </onentry> - <!-- origintype sendid, invokeid and data will not be bound in this event. name, type, and origin - are guaranteed to be there. --> - <transition event="*" cond="$_event/name and $_event/origin and $_event/type" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test544.scxml b/test/w3c/ecma/test544.scxml deleted file mode 100644 index fd09502..0000000 --- a/test/w3c/ecma/test544.scxml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that kvps are represented as <data> elements under event/data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath"> - -<state id="s0"> - <onentry> - <send event="someevent"> - <param name="key1" expr="2"/> - </send> - </onentry> - - <transition event="*" cond="$_event/data/data[@id='key1'] = 2" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test545.scxml b/test/w3c/ecma/test545.scxml deleted file mode 100644 index 1e12770..0000000 --- a/test/w3c/ecma/test545.scxml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that xml content in send is place as XML under event/data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath"> - -<state id="s0"> - <onentry> - <send event="someevent"> - <content><foo xmlns=""><bar>3</bar></foo></content> - </send> - </onentry> - - <transition event="*" cond="$_event/data/foo/bar = 3" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test546.scxml b/test/w3c/ecma/test546.scxml deleted file mode 100644 index 728843b..0000000 --- a/test/w3c/ecma/test546.scxml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that string content in send is place as a string under event/data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath"> - -<state id="s0"> - <onentry> - <send event="someevent"> - <content>some string</content> - </send> - </onentry> - - <transition event="*" cond="$_event/data = 'some string'" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test547.scxml b/test/w3c/ecma/test547.scxml deleted file mode 100644 index 8c04c95..0000000 --- a/test/w3c/ecma/test547.scxml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that assiging to a node set performs the assignment to each node. - This example is taken from the spec. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="cart"> - <myCart xmlns=""> - <books> - <book> - <title>The Zen Mind</title> - </book> - <book> - <title>Freakonomics</title> - </book> - </books> - <cds> - <cd name="Something"/> - </cds> - </myCart> -</data> - </datamodel> - -<state id="s0"> - <onentry> - <assign location="$cart/myCart/books/book" expr="'The Zen Mind'"/> - </onentry> - - <transition cond="$cart/myCart/books/book[1] = 'The Zen Mind' and $cart/myCart/books/book[2] = 'The Zen Mind'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test553.scxml b/test/w3c/ecma/test553.scxml index 3dd0aeb..87062e4 100644 --- a/test/w3c/ecma/test553.scxml +++ b/test/w3c/ecma/test553.scxml @@ -5,7 +5,7 @@ of <send>'s args causes an error.. --><scxml xmlns="http://www.w3.org/2005/07/s <state id="s0"> <onentry> <!-- timeout event --> - <send event="timeout" delayexpr="'500ms'"/> + <send event="timeout" delayexpr="'50ms'"/> <!-- generate an invalid namelist --> <send event="event1" namelist=""foo"/> </onentry> diff --git a/test/w3c/ecma/test555.scxml b/test/w3c/ecma/test555.scxml deleted file mode 100644 index 79dea75..0000000 --- a/test/w3c/ecma/test555.scxml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- in the XPATH data model, test that processor coerces types to produce a string - where it's needed --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - <datamodel> - <data id="var1"> - <books xmlns=""> - <book title="title1"/> - <book title="title2"/> - </books> -</data> - - </datamodel> - -<state id="s0"> - <onentry> - <send eventexpr="$var1"/> - </onentry> - <transition event="error" target="fail"/> - <!-- don't really know what the stringification of that xml structure should be, but if - we get something other than an error, we assume that it worked. --> - <transition event="*" target="pass"/> - </state> - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/ecma/test568.scxml b/test/w3c/ecma/test568.scxml deleted file mode 100644 index e8b888f..0000000 --- a/test/w3c/ecma/test568.scxml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- 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 xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath"> - - -<state id="s0"> - <transition cond="$_ioprocessors/[@name='http://www.w3.org/TR/scxml/#SCXMLEventProcessor']/location/text()" target="pass"/> - <transition target="fail"/> - - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/txml/test252.txml b/test/w3c/txml/test252.txml index ba43543..40c36cb 100644 --- a/test/w3c/txml/test252.txml +++ b/test/w3c/txml/test252.txml @@ -9,7 +9,7 @@ timeout indicates success. --> <state id="s0" initial="s01"> <onentry> - <send event="timeout" conf:delay="1"/> + <send event="timeout" delay="2s"/> </onentry> <transition event="timeout" conf:targetpass=""/> @@ -26,7 +26,7 @@ timeout indicates success. --> <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance"> <state id="sub0"> <onentry> - <send event="timeout" conf:delay=".5"/> + <send event="timeout" delay="2s"/> </onentry> <transition event="timeout" target="subFinal"/> <onexit> diff --git a/test/w3c/update-txml.sh b/test/w3c/update-txml.sh index 09a9602..9fa2c99 100755 --- a/test/w3c/update-txml.sh +++ b/test/w3c/update-txml.sh @@ -14,4 +14,4 @@ rm -rf www.w3.org sed -ie "s/<xsl:attribute name=\"delayexpr\">Var<xsl:value-of select=\".\" \/><\/xsl:attribute>/<xsl:attribute name=\"delayexpr\">(Var<xsl:value-of select=\".\" \/>.slice(0, - 1)) * 50 + 'ms'<\/xsl:attribute>/" confEcma.xsl sed -ie "s/<xsl:attribute name=\"delayexpr\">'<xsl:value-of select=\".\"\/>s'<\/xsl:attribute>/<xsl:attribute name=\"delayexpr\">'<xsl:value-of select=\". * 50\"\/>ms'<\/xsl:attribute>/" confEcma.xsl -rm confEcma.xsle
\ No newline at end of file +rm confEcma.xsle diff --git a/test/w3c/xpath/test252.scxml b/test/w3c/xpath/test252.scxml index f8d93a5..1f92127 100644 --- a/test/w3c/xpath/test252.scxml +++ b/test/w3c/xpath/test252.scxml @@ -5,7 +5,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <state id="s0" initial="s01"> <onentry> - <send event="timeout" delayexpr="'1s'"/> + <send event="timeout" delay="2s"/> </onentry> <transition event="timeout" target="pass"/> @@ -22,7 +22,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <scxml initial="sub0" version="1.0" datamodel="xpath"> <state id="sub0"> <onentry> - <send event="timeout" delayexpr="'.5s'"/> + <send event="timeout" delay="2s"/> </onentry> <transition event="timeout" target="subFinal"/> <onexit> diff --git a/test/w3c/xpath/test444.scxml b/test/w3c/xpath/test444.scxml deleted file mode 100644 index c689674..0000000 --- a/test/w3c/xpath/test444.scxml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that <data> creates a new ecmascript variable. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0"> - <datamodel> - <data id="var1" expr="1"/> - </datamodel> - -<state id="s0"> -<!-- test that var1 can be used as an ecmascript variable --> - <transition cond="++var1==2" target="pass"/> - <transition target="fail"/> -</state> - - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test445.scxml b/test/w3c/xpath/test445.scxml deleted file mode 100644 index f1ae24b..0000000 --- a/test/w3c/xpath/test445.scxml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that ecmascript objects defined by <data> have value undefined if <data> does not assign a value --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0"> - <datamodel> - <data id="var1"/> - </datamodel> - -<state id="s0"> - - <transition cond="var1==undefined" target="pass"/> - <transition target="fail"/> -</state> - - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test446.scxml b/test/w3c/xpath/test446.scxml deleted file mode 100644 index 64ab3c9..0000000 --- a/test/w3c/xpath/test446.scxml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that if the child of <data> is JSON, the processor - assigns it as the value of the var --><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"> - <datamodel> - <data id="var1">[1, 2, 3]</data> - <data id="var2" src="file:test446.txt"/> - </datamodel> - -<state id="s0"> - <transition cond="var1 instanceof Array" target="s1"/> - <transition target="fail"/> - </state> - -<state id="s1"> - <transition cond="var2 instanceof Array" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test448.scxml b/test/w3c/xpath/test448.scxml deleted file mode 100644 index adbc121..0000000 --- a/test/w3c/xpath/test448.scxml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that all ecmascript objects are placed in a single global scope --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0"> - - -<state id="s0"> -<!-- test that a parent state can access a variable defined in a child --> - <transition cond="var1==1" target="s1"/> - <transition target="fail"/> - <state id="s01"> - <datamodel> - <data id="var1" expr="1"/> - </datamodel> - </state> - </state> - <state id="s1" initial="s01p"> - <parallel id="s01p"> - <state id="s01p1"> - <!-- test that we can access a variable defined in a parallel sibling state --> - <transition cond="var2==1" target="pass"/> - <transition target="fail"/> - </state> - <state id="s01p2"> - <datamodel> - <data id="var2" expr="1"/> - </datamodel> - </state> - </parallel> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test449.scxml b/test/w3c/xpath/test449.scxml deleted file mode 100644 index d06cc9a..0000000 --- a/test/w3c/xpath/test449.scxml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that ecmascript objects are converted to booleans inside cond --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0"> - - -<state id="s0"> - <transition cond="'foo'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test451.scxml b/test/w3c/xpath/test451.scxml deleted file mode 100644 index e939ded..0000000 --- a/test/w3c/xpath/test451.scxml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- simple test of the in() predicate --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="p"> - - - <parallel id="p"> - - <state id="s0"> - <transition cond="In('s1')" target="pass"/> - <transition target="fail"/> - </state> - - <state id="s1"/> - </parallel> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test452.scxml b/test/w3c/xpath/test452.scxml deleted file mode 100644 index 4f38ca7..0000000 --- a/test/w3c/xpath/test452.scxml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that we can assign to any location in the datamodel. In this case, we just test that we can assign -to a substructure (not the top level variable). This may not be the most idiomatic way to write the test --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0"> - <datamodel> - <data id="foo" expr="0"/> - </datamodel> - <script> - function testobject() { - this.bar = 0;} - </script> -<state id="s0"> - <onentry> - <assign location="foo" expr="new testobject();"/> -<!-- try to assign to foo's bar property --> - <assign location="foo.bar" expr="1"/> - <raise event="event1"/> - </onentry> -<!-- test that we have assigned to foo's bar property --> - <transition event="event1" cond="foo.bar == 1" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test453.scxml b/test/w3c/xpath/test453.scxml deleted file mode 100644 index 33b904d..0000000 --- a/test/w3c/xpath/test453.scxml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that we can use any ecmascript expression as a value expression. -In this case, we just test that we can assign -a function to a variable and then call it. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0"> - <datamodel> - <data id="var1" expr="function(invar) {return invar + 1;}"/> - </datamodel> - -<state id="s0"> - <onentry> - <raise event="event1"/> - </onentry> -<!-- test that we can call the function --> - <transition event="event1" cond="var1(2) == 3" target="pass"/> - <transition event="*" target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test456.scxml b/test/w3c/xpath/test456.scxml deleted file mode 100644 index 2aebab0..0000000 --- a/test/w3c/xpath/test456.scxml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- we can't test that _any_ ecmascript is valid inside <script>, so we -just run a simple one and check that it can update the data model. --><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"> -<datamodel> - <data id="Var1" expr="0"/> - </datamodel> - - <state id="s0"> - <onentry> - <script> - Var1+=1 - </script> - </onentry> - <transition cond="$Var1/text() =1" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test457.scxml b/test/w3c/xpath/test457.scxml deleted file mode 100644 index 86cf156..0000000 --- a/test/w3c/xpath/test457.scxml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that an the legal iterable collections are arrays, namely objects that satisfy instanceof(Array) in ECMAScript. - the legal values for the 'item' attribute on foreach are legal ECMAScript variable names.. --><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"> -<datamodel> - <data id="Var1" expr="0"/> - <data id="Var2"/> - <data id="Var3"/> - <data id="Var4" expr="7"/> - <data id="Var5" expr="[1,2,3]"/> - <data id="Var6"/> - </datamodel> - - <state id="s0"> - <onentry> -<!-- invalid array, legal item --> - <foreach item="Var2" index="Var3" array="Var4"> - <assign location="Var1" expr="Var1 + 1"/> - </foreach> - <raise event="foo"/> - </onentry> - <transition event="error.execution" target="s1"/> - <transition event="*" target="fail"/> - </state> - - <state id="s1"> - <onentry> -<!-- illegal item, legal array --> - <foreach item="'continue'" index="Var3" array="Var5"> - <assign location="Var1" expr="Var1 + 1"/> - </foreach> - <raise event="bar"/> - </onentry> - <transition event="error.execution" target="s2"/> - <transition event="bar" target="fail"/> - </state> - -<state id="s2"> - <!-- check that var1 has its original value (so executable content never got executed --> - <transition cond="Var1==0" target="s3"/> - <transition target="fail"/> - </state> - - -<!-- finally check that a legal array works properly --> -<state id="s3"> - <onentry> - <assign location="Var6" expr="0"/> - <foreach item="Var2" array="Var5"> - <assign location="Var6" expr="Var6 + Var2"/> - </foreach> - </onentry> - <transition cond="Var6==6" target="pass"/> - <transition target="fail"/> - </state> - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - - - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test459.scxml b/test/w3c/xpath/test459.scxml deleted file mode 100644 index b631c25..0000000 --- a/test/w3c/xpath/test459.scxml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach goes over the array in the right order. since the array contains 1 2 3, we compare the current -value with the previous value, which is stored in var1. The current value should always be larger. If -it ever isn't, set Var4 to 0, indicating failure. Also check that the final value of the index -is 2 (meaning that the initial value was 0, not 1) --><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"> -<datamodel> - <data id="Var1" expr="0"/> <!-- contains the previous value --> - <data id="Var2"/> <!-- the item which will contain the current value --> - <data id="Var3"/> <!-- the index --> - <data id="Var4" expr="[1,2,3]"/> - <data id="Var5" expr="1"/> <!-- 1 if success, 0 if failure --> - </datamodel> - - <state id="s0"> - <onentry> - <foreach item="Var2" array="Var4" index="Var3"> - <if cond="Var1<Var2"> - <assign location="Var1" expr="Var2"/> - <else/> - <!-- values are out of order, record failure --> - <assign location="Var5" expr="0"/> - </if> - </foreach> - </onentry> - - <!-- check that var1 has its original value --> - <transition cond="Var4==0 | Var3 != 2" target="fail"/> - <transition target="pass"/> - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - - - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test460.scxml b/test/w3c/xpath/test460.scxml deleted file mode 100644 index 8ba3e5e..0000000 --- a/test/w3c/xpath/test460.scxml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that <foreach> does a shallow copy, so that modifying the array does not change -the iteration behavior. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0"> - <datamodel> - <data id="Var1" expr="[1,2,3]"/> - <data id="Var2" expr="0"/> <!-- counts the number of iterations --> - </datamodel> - -<state id="s0"> - <onentry> - <foreach item="Var3" array="Var1"> - <assign location="Var1" expr="[].concat(Var1, [4])"/> - <assign location="Var2" expr="Var2 + 1"/> - </foreach> - </onentry> - - <transition cond="Var2==3" target="pass"/> - <transition target="fail"/> -</state> - - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test557.scxml b/test/w3c/xpath/test557.scxml deleted file mode 100644 index 6f4eed1..0000000 --- a/test/w3c/xpath/test557.scxml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that if the child of <data> is XML, or if XML is loaded via src=, the processor - assigns it as the value of the var --><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"> - <datamodel> - <data id="var1"> - <books xmlns=""> - <book title="title1"/> - <book title="title2"/> - </books> -</data> - <data id="var2" src="file:test557.txt"/> - </datamodel> - -<state id="s0"> - <transition cond="var1.getElementsByTagName('book')[0].getAttribute('title') == 'title1'" target="s1"/> - <transition target="fail"/> - </state> - -<state id="s1"> - <transition cond="var2.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test558.scxml b/test/w3c/xpath/test558.scxml deleted file mode 100644 index a075100..0000000 --- a/test/w3c/xpath/test558.scxml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that if the child of <data> is not XML, or if XML is loaded via src=, - the processor treats the value as a string, does whitespace normalization and assigns it to the var.--><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"> - <datamodel> - <data id="var1"> -this is -a string -</data> - <data id="var2" src="file:test558.txt"/> - </datamodel> - -<state id="s0"> - <transition cond="var1 == 'this is a string'" target="s1"/> - <transition target="fail"/> - </state> - -<state id="s1"> - <transition cond="var2 == 'this is a string'" target="pass"/> - <transition target="fail"/> - </state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test560.scxml b/test/w3c/xpath/test560.scxml deleted file mode 100644 index d283b1a..0000000 --- a/test/w3c/xpath/test560.scxml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates correct structure in - _event.data when receiving KVPs 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"> - - -<state id="s0"> - <onentry> - <send event="foo"> - <param name="aParam" expr="1"/> - </send> - </onentry> - <transition event="foo" cond="_event.data.aParam == 1" target="pass"/> - <transition event="*" target="fail"/> - </state> - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test561.scxml b/test/w3c/xpath/test561.scxml deleted file mode 100644 index e94a813..0000000 --- a/test/w3c/xpath/test561.scxml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates an ECMAScript DOM object - _event.data when receiving XML 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"> - - -<state id="s0"> - <onentry> - <send event="foo"> - <content> -<books xmlns=""> -<book title="title1"/> -<book title="title2"/> -</books> -</content> - </send> - </onentry> - <transition event="foo" cond="_event.data.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" target="pass"/> - <transition event="*" target="fail"/> - </state> - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test562.scxml b/test/w3c/xpath/test562.scxml deleted file mode 100644 index f5997bb..0000000 --- a/test/w3c/xpath/test562.scxml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates space normalized string in - _event.data when receiving anything other than KVPs or XML 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"> - - -<state id="s0"> - <onentry> - <send event="foo"> - <content> -this is a -string -</content> - </send> - </onentry> - <transition event="foo" cond="_event.data == 'this is a string'" target="pass"/> - <transition event="*" target="fail"/> - </state> - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test569.scxml b/test/w3c/xpath/test569.scxml deleted file mode 100644 index 832a0c0..0000000 --- a/test/w3c/xpath/test569.scxml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that location field is found inside entry for SCXML Event I/O processor in the ECMAScript -data model. The tests for the relevant event i/o processors will test that it can be used to -send events. --><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"> - - -<state id="s0"> - <transition cond="_ioprocessors['scxml'].location" target="pass"/> - <transition target="fail"/> - - </state> - - <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> - <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file diff --git a/test/w3c/xpath/test578.scxml b/test/w3c/xpath/test578.scxml deleted file mode 100644 index 9a25195..0000000 --- a/test/w3c/xpath/test578.scxml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- 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"> - - -<state id="s0"> - <onentry> - <send event="foo"> - <content>{ "productName" : "bar", "size" : 27 }</content> - </send> - </onentry> - <transition event="foo" cond="_event.data.productName == 'bar'" target="pass"/> - <transition event="*" target="fail"/> - </state> - - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file |