summaryrefslogtreecommitdiffstats
path: root/test/samples
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-25 20:36:03 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-25 20:36:03 (GMT)
commit00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e (patch)
treeafa4183b1bb4ee777cad27475c3d7679822c8046 /test/samples
parent4d6fb580b1c1378cb1441fff4adeca889cbba58e (diff)
downloaduscxml-00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e.zip
uscxml-00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e.tar.gz
uscxml-00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e.tar.bz2
Refactored CMakeLists and updated W3C tests
Diffstat (limited to 'test/samples')
-rw-r--r--test/samples/uscxml/test-prolog.scxml30
-rw-r--r--test/samples/w3c/confEcma.xsl8
-rwxr-xr-xtest/samples/w3c/convert-tests.sh3
-rw-r--r--test/samples/w3c/ecma/robots.txt96
-rw-r--r--test/samples/w3c/ecma/test153.scxml2
-rw-r--r--test/samples/w3c/ecma/test201.scxml2
-rw-r--r--test/samples/w3c/ecma/test333.scxml2
-rw-r--r--test/samples/w3c/ecma/test335.scxml2
-rw-r--r--test/samples/w3c/ecma/test337.scxml2
-rw-r--r--test/samples/w3c/ecma/test339.scxml2
-rw-r--r--test/samples/w3c/ecma/test343.scxml2
-rw-r--r--test/samples/w3c/ecma/test488.scxml2
-rw-r--r--test/samples/w3c/ecma/test528.scxml2
-rw-r--r--test/samples/w3c/ecma/test568.scxml2
-rw-r--r--test/samples/w3c/txml/test201.txml4
-rwxr-xr-xtest/samples/w3c/update-txml.sh4
-rw-r--r--test/samples/w3c/xpath/robots.txt96
-rw-r--r--test/samples/w3c/xpath/test201.scxml2
18 files changed, 243 insertions, 20 deletions
diff --git a/test/samples/uscxml/test-prolog.scxml b/test/samples/uscxml/test-prolog.scxml
index 266bd8d..e29def1 100644
--- a/test/samples/uscxml/test-prolog.scxml
+++ b/test/samples/uscxml/test-prolog.scxml
@@ -1,3 +1,4 @@
+<?xml version="1.0"?>
<scxml datamodel="prolog" initial="start" binding="late">
<datamodel>
<data id="facts">
@@ -12,11 +13,34 @@ mouse(jerry).
animal(X):- mouse(X).
</script>
<state id="start">
- <transition target="end" cond="not(cat(jerry)), cat(tom), mouse(jerry)." />
+ <onentry>
+ <log label="SessionId" expr="sessionId(X)"/>
+ <log label="Name" expr="name(X)"/>
+ <send event="foo">This is a foo event.</send>
+ </onentry>
+ <transition event="foo" cond="not(cat(jerry)), cat(tom), mouse(jerry)." target="s1"/>
+ </state>
+ <state id="s1">
+ <onentry>
+ <log expr="eventName(X)."/>
+ <send event="bar">
+ <ISBNdb server_time="2009-03-19T02:01:00Z">
+ <BookList total_results="1" page_size="10" page_number="1" shown_results="1">
+ <BookData book_id="the_data_compression_book" isbn="1558514341">
+ <Title>The Data Compression Book</Title>
+ <TitleLong/>
+ <AuthorsText>Mark Nelson, Jean-Loup Gailly, </AuthorsText>
+ <PublisherText publisher_id="m_t_books">M&amp;T Books</PublisherText>
+ </BookData>
+ </BookList>
+ </ISBNdb>
+ </send>
+ </onentry>
+ <transition target="end"/>
</state>
<state id="end" final="true">
<onentry>
- <log expr="animal(X)." />
+ <log expr="animal(X)."/>
</onentry>
</state>
-</scxml> \ No newline at end of file
+</scxml>
diff --git a/test/samples/w3c/confEcma.xsl b/test/samples/w3c/confEcma.xsl
index 0ec3d3d..61d48c6 100644
--- a/test/samples/w3c/confEcma.xsl
+++ b/test/samples/w3c/confEcma.xsl
@@ -356,12 +356,12 @@
<xsl:attribute name="cond">
<xsl:analyze-string select="."
regex="([0-9]+)([=&lt;&gt;]=?)([0-9+])">
- <xsl:matching-substring>Var<xsl:value-of select="regex-group(1)"/><xsl:text>/text() </xsl:text>
+ <xsl:matching-substring>Var<xsl:value-of select="regex-group(1)"/>
<xsl:variable name="op"><xsl:value-of select="regex-group(2)"/></xsl:variable>
<xsl:choose>
<xsl:when test="$op='='">=</xsl:when>
<xsl:otherwise><xsl:value-of select="$op"/></xsl:otherwise>
- </xsl:choose>Var<xsl:value-of select="regex-group(3)"/><xsl:text>/text() </xsl:text>
+ </xsl:choose>Var<xsl:value-of select="regex-group(3)"/>
</xsl:matching-substring>
</xsl:analyze-string>
</xsl:attribute>
@@ -416,7 +416,7 @@ is the second argument -->
</xsl:template>
<xsl:template match="//@conf:emptyEventData">
- <xsl:attribute name="cond">_event.data == null</xsl:attribute>
+ <xsl:attribute name="cond">typeof _event.data === 'undefined'</xsl:attribute>
</xsl:template>
<!-- return true if the _name system var has the specified quoted value -->
@@ -494,7 +494,7 @@ is the second argument -->
<!-- returns true if specified field of _event has no value -->
<xsl:template match="//@conf:eventFieldHasNoValue">
- <xsl:attribute name="cond">_event.<xsl:value-of select="." /> == null</xsl:attribute>
+ <xsl:attribute name="cond">typeof _event.<xsl:value-of select="." /> === 'undefined' </xsl:attribute>
</xsl:template>
<!-- true if the language of _event matches the processor's datamodel -->
diff --git a/test/samples/w3c/convert-tests.sh b/test/samples/w3c/convert-tests.sh
index 4c47c71..42f8fce 100755
--- a/test/samples/w3c/convert-tests.sh
+++ b/test/samples/w3c/convert-tests.sh
@@ -18,3 +18,6 @@ do
echo "Processing $TXML to $DEST"
java -jar /Users/sradomski/Developer/Applications/SaxonHE9-4-0-7J/saxon9he.jar $TXML confXPath.xsl -o:$DEST
done
+
+cp txml/*.txt ecma/
+cp txml/*.txt xpath/ \ No newline at end of file
diff --git a/test/samples/w3c/ecma/robots.txt b/test/samples/w3c/ecma/robots.txt
new file mode 100644
index 0000000..54f3e01
--- /dev/null
+++ b/test/samples/w3c/ecma/robots.txt
@@ -0,0 +1,96 @@
+#
+# robots.txt for http://www.w3.org/
+#
+# $Id: robots.txt,v 1.66 2012/07/17 21:30:56 gerald Exp $
+#
+
+# For use by search.w3.org
+User-agent: W3C-gsa
+Disallow: /Out-Of-Date
+
+User-agent: W3T_SE
+Disallow: /Out-Of-Date
+
+User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT; MS Search 4.0 Robot)
+Disallow: /
+
+# W3C Link checker
+User-agent: W3C-checklink
+Disallow:
+
+# the following settings apply to all bots
+User-agent: *
+# Blogs - WordPress
+# https://codex.wordpress.org/Search_Engine_Optimization_for_WordPress#Robots.txt_Optimization
+Disallow: /*/wp-admin/
+Disallow: /*/wp-includes/
+Disallow: /*/wp-content/plugins/
+Disallow: /*/wp-content/cache/
+Disallow: /*/wp-content/themes/
+Disallow: /blog/*/trackback/
+Disallow: /blog/*/feed/
+Disallow: /blog/*/comments/
+Disallow: /blog/*/category/*/*
+Disallow: /blog/*/*/trackback/
+Disallow: /blog/*/*/feed/
+Disallow: /blog/*/*/comments/
+Disallow: /blog/*/*?
+Disallow: /community/trackback/
+Disallow: /community/feed/
+Disallow: /community/comments/
+Disallow: /community/category/*/*
+Disallow: /community/*/trackback/
+Disallow: /community/*/feed/
+Disallow: /community/*/comments/
+Disallow: /community/*/category/*/*
+Disallow: /community/*?
+Disallow: /Consortium/Offices/trackback/
+Disallow: /Consortium/Offices/feed/
+Disallow: /Consortium/Offices/comments/
+Disallow: /Consortium/Offices/category/*/*
+Disallow: /Consortium/Offices/*/trackback/
+Disallow: /Consortium/Offices/*/feed/
+Disallow: /Consortium/Offices/*/comments/
+Disallow: /Consortium/Offices/*?
+# Wikis - Mediawiki
+# https://www.mediawiki.org/wiki/Manual:Robots.txt
+Disallow: /wiki/index.php?
+Disallow: /wiki/index.php/Help
+Disallow: /wiki/index.php/MediaWiki
+Disallow: /wiki/index.php/Special:
+Disallow: /wiki/index.php/Template
+Disallow: /wiki/skins/
+Disallow: /*/wiki/index.php?
+Disallow: /*/wiki/index.php/Help
+Disallow: /*/wiki/index.php/MediaWiki
+Disallow: /*/wiki/index.php/Special:
+Disallow: /*/wiki/index.php/Template
+# various other access-controlled or expensive areas
+Disallow: /2004/ontaria/basic
+Disallow: /Team/
+Disallow: /Project
+Disallow: /Web
+Disallow: /Systems
+Disallow: /History
+Disallow: /Out-Of-Date
+Disallow: /2002/02/mid
+Disallow: /mid/
+Disallow: /2005/06/blog/
+Disallow: /2004/08/W3CTalks
+Disallow: /2007/11/Talks/search
+Disallow: /People/all/
+Disallow: /RDF/Validator/ARPServlet
+Disallow: /2003/03/Translations/byLanguage
+Disallow: /2003/03/Translations/byTechnology
+Disallow: /2005/11/Translations/Query
+Disallow: /2000/06/webdata/xslt
+Disallow: /2000/09/webdata/xslt
+Disallow: /2005/08/online_xslt/xslt
+Disallow: /Bugs/
+Disallow: /Search/Mail/Public/
+Disallow: /2006/02/chartergen
+Disallow: /2004/01/pp-impl
+Disallow: /Consortium/supporters
+Disallow: /2007/08/pyRdfa/
+Disallow: /WAI/PF/comments/
+
diff --git a/test/samples/w3c/ecma/test153.scxml b/test/samples/w3c/ecma/test153.scxml
index ad54994..c46c32d 100644
--- a/test/samples/w3c/ecma/test153.scxml
+++ b/test/samples/w3c/ecma/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&lt;Var2">
<assign location="Var1" expr="Var2"/>
<else/>
<!-- values are out of order, record failure -->
diff --git a/test/samples/w3c/ecma/test201.scxml b/test/samples/w3c/ecma/test201.scxml
index 6460bbb..8ded0d5 100644
--- a/test/samples/w3c/ecma/test201.scxml
+++ b/test/samples/w3c/ecma/test201.scxml
@@ -3,7 +3,7 @@ test since platforms are not required to support basic http event i/o --><scxml
<state id="s0">
<onentry>
- <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" event="event1"/>
+ <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="_ioprocessors['basichttp']['location']" event="event1"/>
<send event="timeout"/>
</onentry>
diff --git a/test/samples/w3c/ecma/test333.scxml b/test/samples/w3c/ecma/test333.scxml
index cb9721a..9e06896 100644
--- a/test/samples/w3c/ecma/test333.scxml
+++ b/test/samples/w3c/ecma/test333.scxml
@@ -4,7 +4,7 @@
<onentry>
<send event="foo"/>
</onentry>
- <transition event="foo" cond="_event.sendid == null" target="pass"/>
+ <transition event="foo" cond="typeof _event.sendid === 'undefined' " target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/samples/w3c/ecma/test335.scxml b/test/samples/w3c/ecma/test335.scxml
index 57da1ba..a56074a 100644
--- a/test/samples/w3c/ecma/test335.scxml
+++ b/test/samples/w3c/ecma/test335.scxml
@@ -4,7 +4,7 @@
<onentry>
<raise event="foo"/>
</onentry>
- <transition event="foo" cond="_event.origin == null" target="pass"/>
+ <transition event="foo" cond="typeof _event.origin === 'undefined' " target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/samples/w3c/ecma/test337.scxml b/test/samples/w3c/ecma/test337.scxml
index c4c663e..71092a8 100644
--- a/test/samples/w3c/ecma/test337.scxml
+++ b/test/samples/w3c/ecma/test337.scxml
@@ -4,7 +4,7 @@
<onentry>
<raise event="foo"/>
</onentry>
- <transition event="foo" cond="_event.origintype == null" target="pass"/>
+ <transition event="foo" cond="typeof _event.origintype === 'undefined' " target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/samples/w3c/ecma/test339.scxml b/test/samples/w3c/ecma/test339.scxml
index 7ffbabf..82864c9 100644
--- a/test/samples/w3c/ecma/test339.scxml
+++ b/test/samples/w3c/ecma/test339.scxml
@@ -4,7 +4,7 @@
<onentry>
<raise event="foo"/>
</onentry>
- <transition event="foo" cond="_event.invokeid == null" target="pass"/>
+ <transition event="foo" cond="typeof _event.invokeid === 'undefined' " target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/samples/w3c/ecma/test343.scxml b/test/samples/w3c/ecma/test343.scxml
index 9765739..7f15cf0 100644
--- a/test/samples/w3c/ecma/test343.scxml
+++ b/test/samples/w3c/ecma/test343.scxml
@@ -24,7 +24,7 @@
event has empty event.data -->
<state id="s1">
- <transition event="done.state.s0" cond="_event.data == null" target="pass"/>
+ <transition event="done.state.s0" cond="typeof _event.data === 'undefined'" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/samples/w3c/ecma/test488.scxml b/test/samples/w3c/ecma/test488.scxml
index 8e007e3..9d9e1d8 100644
--- a/test/samples/w3c/ecma/test488.scxml
+++ b/test/samples/w3c/ecma/test488.scxml
@@ -24,7 +24,7 @@
event has empty event.data -->
<state id="s1">
- <transition event="done.state.s0" cond="_event.data == null" target="pass"/>
+ <transition event="done.state.s0" cond="typeof _event.data === 'undefined'" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/samples/w3c/ecma/test528.scxml b/test/samples/w3c/ecma/test528.scxml
index 9f1ebd4..edeb367 100644
--- a/test/samples/w3c/ecma/test528.scxml
+++ b/test/samples/w3c/ecma/test528.scxml
@@ -24,7 +24,7 @@
event has empty event.data -->
<state id="s1">
- <transition event="done.state.s0" cond="_event.data == null" target="pass"/>
+ <transition event="done.state.s0" cond="typeof _event.data === 'undefined'" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/samples/w3c/ecma/test568.scxml b/test/samples/w3c/ecma/test568.scxml
index 17bc380..e8b888f 100644
--- a/test/samples/w3c/ecma/test568.scxml
+++ b/test/samples/w3c/ecma/test568.scxml
@@ -4,7 +4,7 @@ send events. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http:
<state id="s0">
- <transition cond="$_ioprocessors/processor[@name='http://www.w3.org/TR/scxml/#SCXMLEventProcessor']/location/text()" target="pass"/>
+ <transition cond="$_ioprocessors/[@name='http://www.w3.org/TR/scxml/#SCXMLEventProcessor']/location/text()" target="pass"/>
<transition target="fail"/>
</state>
diff --git a/test/samples/w3c/txml/test201.txml b/test/samples/w3c/txml/test201.txml
index c21eb7e..cdcf285 100644
--- a/test/samples/w3c/txml/test201.txml
+++ b/test/samples/w3c/txml/test201.txml
@@ -7,7 +7,9 @@ test since platforms are not required to support basic http event i/o -->
<state id="s0">
<onentry>
- <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" event="event1"/>
+ <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"
+ conf:basicHTTPAccessURITarget=""
+ event="event1"/>
<send event="timeout"/>
</onentry>
diff --git a/test/samples/w3c/update-txml.sh b/test/samples/w3c/update-txml.sh
index 6cf9c01..3c7255b 100755
--- a/test/samples/w3c/update-txml.sh
+++ b/test/samples/w3c/update-txml.sh
@@ -1,5 +1,7 @@
#!/bin/bash
-wget -rl1 -Atxml,txt http://www.w3.org/Voice/2013/scxml-irp/
+wget -rl1 -Atxml,txt,xsl 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 \;
+find ./www.w3.org -name *.xsl -exec cp {} . \;
rm -rf www.w3.org \ No newline at end of file
diff --git a/test/samples/w3c/xpath/robots.txt b/test/samples/w3c/xpath/robots.txt
new file mode 100644
index 0000000..54f3e01
--- /dev/null
+++ b/test/samples/w3c/xpath/robots.txt
@@ -0,0 +1,96 @@
+#
+# robots.txt for http://www.w3.org/
+#
+# $Id: robots.txt,v 1.66 2012/07/17 21:30:56 gerald Exp $
+#
+
+# For use by search.w3.org
+User-agent: W3C-gsa
+Disallow: /Out-Of-Date
+
+User-agent: W3T_SE
+Disallow: /Out-Of-Date
+
+User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT; MS Search 4.0 Robot)
+Disallow: /
+
+# W3C Link checker
+User-agent: W3C-checklink
+Disallow:
+
+# the following settings apply to all bots
+User-agent: *
+# Blogs - WordPress
+# https://codex.wordpress.org/Search_Engine_Optimization_for_WordPress#Robots.txt_Optimization
+Disallow: /*/wp-admin/
+Disallow: /*/wp-includes/
+Disallow: /*/wp-content/plugins/
+Disallow: /*/wp-content/cache/
+Disallow: /*/wp-content/themes/
+Disallow: /blog/*/trackback/
+Disallow: /blog/*/feed/
+Disallow: /blog/*/comments/
+Disallow: /blog/*/category/*/*
+Disallow: /blog/*/*/trackback/
+Disallow: /blog/*/*/feed/
+Disallow: /blog/*/*/comments/
+Disallow: /blog/*/*?
+Disallow: /community/trackback/
+Disallow: /community/feed/
+Disallow: /community/comments/
+Disallow: /community/category/*/*
+Disallow: /community/*/trackback/
+Disallow: /community/*/feed/
+Disallow: /community/*/comments/
+Disallow: /community/*/category/*/*
+Disallow: /community/*?
+Disallow: /Consortium/Offices/trackback/
+Disallow: /Consortium/Offices/feed/
+Disallow: /Consortium/Offices/comments/
+Disallow: /Consortium/Offices/category/*/*
+Disallow: /Consortium/Offices/*/trackback/
+Disallow: /Consortium/Offices/*/feed/
+Disallow: /Consortium/Offices/*/comments/
+Disallow: /Consortium/Offices/*?
+# Wikis - Mediawiki
+# https://www.mediawiki.org/wiki/Manual:Robots.txt
+Disallow: /wiki/index.php?
+Disallow: /wiki/index.php/Help
+Disallow: /wiki/index.php/MediaWiki
+Disallow: /wiki/index.php/Special:
+Disallow: /wiki/index.php/Template
+Disallow: /wiki/skins/
+Disallow: /*/wiki/index.php?
+Disallow: /*/wiki/index.php/Help
+Disallow: /*/wiki/index.php/MediaWiki
+Disallow: /*/wiki/index.php/Special:
+Disallow: /*/wiki/index.php/Template
+# various other access-controlled or expensive areas
+Disallow: /2004/ontaria/basic
+Disallow: /Team/
+Disallow: /Project
+Disallow: /Web
+Disallow: /Systems
+Disallow: /History
+Disallow: /Out-Of-Date
+Disallow: /2002/02/mid
+Disallow: /mid/
+Disallow: /2005/06/blog/
+Disallow: /2004/08/W3CTalks
+Disallow: /2007/11/Talks/search
+Disallow: /People/all/
+Disallow: /RDF/Validator/ARPServlet
+Disallow: /2003/03/Translations/byLanguage
+Disallow: /2003/03/Translations/byTechnology
+Disallow: /2005/11/Translations/Query
+Disallow: /2000/06/webdata/xslt
+Disallow: /2000/09/webdata/xslt
+Disallow: /2005/08/online_xslt/xslt
+Disallow: /Bugs/
+Disallow: /Search/Mail/Public/
+Disallow: /2006/02/chartergen
+Disallow: /2004/01/pp-impl
+Disallow: /Consortium/supporters
+Disallow: /2007/08/pyRdfa/
+Disallow: /WAI/PF/comments/
+
diff --git a/test/samples/w3c/xpath/test201.scxml b/test/samples/w3c/xpath/test201.scxml
index f988e7e..8f4e285 100644
--- a/test/samples/w3c/xpath/test201.scxml
+++ b/test/samples/w3c/xpath/test201.scxml
@@ -3,7 +3,7 @@ test since platforms are not required to support basic http event i/o --><scxml
<state id="s0">
<onentry>
- <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" event="event1"/>
+ <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" event="event1"/>
<send event="timeout"/>
</onentry>