summaryrefslogtreecommitdiffstats
path: root/test/samples/uscxml
diff options
context:
space:
mode:
Diffstat (limited to 'test/samples/uscxml')
-rw-r--r--test/samples/uscxml/demos/3d-file-server.scxml7
-rw-r--r--test/samples/uscxml/test-dirmon.scxml16
-rw-r--r--test/samples/uscxml/test-umundo-s11n.scxml22
3 files changed, 34 insertions, 11 deletions
diff --git a/test/samples/uscxml/demos/3d-file-server.scxml b/test/samples/uscxml/demos/3d-file-server.scxml
new file mode 100644
index 0000000..4823127
--- /dev/null
+++ b/test/samples/uscxml/demos/3d-file-server.scxml
@@ -0,0 +1,7 @@
+<scxml datamodel="ecmascript">
+ <state id="start">
+ <invoker type="DirectoryMonitor">
+
+ </invoker>
+ </start>
+</scxml> \ No newline at end of file
diff --git a/test/samples/uscxml/test-dirmon.scxml b/test/samples/uscxml/test-dirmon.scxml
new file mode 100644
index 0000000..872757f
--- /dev/null
+++ b/test/samples/uscxml/test-dirmon.scxml
@@ -0,0 +1,16 @@
+<scxml datamodel="ecmascript">
+ <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" />
+ <state id="start">
+ <invoke type="dirmon">
+ <param name="dir" expr="'.'" />
+ <param name="recurse" expr="'true'" />
+ <param name="reportexisting" expr="'true'" />
+ <param name="suffix" expr="'.scxml'" />
+ <finalize>
+ <script>
+ dump(_event);
+ </script>
+ </finalize>
+ </invoke>
+ </state>
+</scxml> \ No newline at end of file
diff --git a/test/samples/uscxml/test-umundo-s11n.scxml b/test/samples/uscxml/test-umundo-s11n.scxml
index 001d72e..f4a9a02 100644
--- a/test/samples/uscxml/test-umundo-s11n.scxml
+++ b/test/samples/uscxml/test-umundo-s11n.scxml
@@ -1,25 +1,25 @@
<scxml datamodel="ecmascript">
<script>
<![CDATA[
- function dump(arr,level) {
- if(!level) level = 0;
+ function dump(object, level) {
+ if (!level) level = 0;
- var level_padding = "";
- for(var j=0;j < level+1;j++) level_padding += " ";
+ var padding = "";
+ for (var j=0;j < level+1;j++) padding += " ";
- if(typeof(arr) == 'object') {
- for(var item in arr) {
- var value = arr[item];
+ if (typeof(obj) == 'object') {
+ for (var item in obj) {
+ var value = obj[item];
if(typeof(value) == 'object') {
- print(level_padding + "'" + item + "' ...\n");
- print(dump(value,level+1));
+ print (padding + "'" + item + "' ...\n");
+ print (dump (value, level+1));
} else {
- print(level_padding + "'" + item + "' => \"" + value + "\"\n");
+ print (padding + "'" + item + "' => \"" + value + "\"\n");
}
}
} else {
- print("===> "+arr+" <===("+typeof(arr)+")");
+ print("===> " + object + " <===(" + typeof(object) + ")");
}
}
]]>