-;; 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))