]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/websocket/websocket-functional-test.el
Upgrade to version 1.3.
[gnu-emacs-elpa] / packages / websocket / websocket-functional-test.el
index a87d021ed492cb64e6732a89fe8dd0646ecb6690..6a9481fc23fd970f838575dbf627ec1afa99f2e7 100644 (file)
@@ -1,4 +1,22 @@
-;; Simple functional testing
+;;; websocket-functional-test.el --- Simple functional testing
+
+;; Copyright (c) 2013  Free Software Foundation, Inc.
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 3 of the
+;; License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
 ;; Usage: emacs -batch -Q -L . -l websocket-functional-test.el
 ;;
 ;; Note: this functional tests requires that you have python with the
         wstest-msgs nil)
   (sleep-for 0.3)
   (assert (websocket-openp wstest-ws))
+  (assert (eq 'open (websocket-ready-state wstest-ws)))
   (assert (null wstest-msgs))
   (websocket-send-text wstest-ws "Hi!")
-  (sleep-for 0.3)
+  (sleep-for 1)
   (assert (equal (car wstest-msgs) "Hi!"))
   (websocket-close wstest-ws))