summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hintz <t@thintz.com>2014-10-08 17:20:57 -0700
committerThomas Hintz <t@thintz.com>2014-10-08 17:20:57 -0700
commitde406f11510f8cc6974fd71c7a48ff7ae40d6246 (patch)
tree6a3ced6c516910c4b579be76790fcee25f868168
parentfb9d35db77d2b732b1be412899723fc4e0190063 (diff)
downloadwebsockets-de406f11510f8cc6974fd71c7a48ff7ae40d6246.tar.gz
Add autobahn test suite echo server.
-rw-r--r--test/echo-server.scm23
-rw-r--r--test/ws-test.spec10
2 files changed, 33 insertions, 0 deletions
diff --git a/test/echo-server.scm b/test/echo-server.scm
new file mode 100644
index 0000000..596fc49
--- /dev/null
+++ b/test/echo-server.scm
@@ -0,0 +1,23 @@
+(import chicken scheme posix)
+(use spiffy websockets)
+
+(ping-interval 0)
+(drop-incoming-pings #f)
+(propagate-common-errors #f)
+
+(handle-not-found
+ (lambda (path)
+ (with-websocket
+ (lambda ()
+ (let loop ()
+ (receive (data type) (receive-message)
+ (unless (eq? type 'connection-close)
+ (send-message type data)
+ (loop))))))))
+
+(debug-log (current-output-port))
+(root-path ".")
+(server-port 8080)
+(start-server)
+
+
diff --git a/test/ws-test.spec b/test/ws-test.spec
new file mode 100644
index 0000000..56990c4
--- /dev/null
+++ b/test/ws-test.spec
@@ -0,0 +1,10 @@
+{
+ "servers": [
+ {"agent": "AutobahnServer",
+ "url": "ws://localhost:8080/web-socket",
+ "options": {"version": 13}}
+ ],
+ "cases": ["1.*", "2.*", "3.*", "4.*", "5.*"],
+ "exclude-cases": [],
+ "exclude-agent-cases": {}
+}