1 ;;; emacs-web-server-test.el --- Test the Emacs Web Server
3 ;; Copyright (C) 2013 Eric Schulte <schulte.eric@gmail.com>
5 ;; Author: Eric Schulte <schulte.eric@gmail.com>
6 ;; License: GPLV3 (see the COPYING file in this directory)
8 ;;; TODO: fill in these tests, and then write more
11 (require 'emacs-web-server)
14 (ert-deftest ews/keyword-style-handler ()
15 "Ensure that a simple keyword-style handler matches correctly."
16 (should t) ; should match one
17 (should-not nil) ; should not match another
20 (ert-deftest ews/function-style-handler ()
21 "Ensure that a function-style handler matches correctly."
22 (should t) ; should match one
23 (should-not nil) ; should not match another
26 (ert-deftest ews/removed-from-ews-servers-after-stop ()
29 (ert-deftest ews/parse-many-headers ()
30 "Test that a number of headers parse successfully."
33 (ert-deftest ews/parse-post-data ()
36 User-Agent: curl/7.33.0
41 Content-Type: multipart/form-data; boundary=----------------f1270d0deb77af03
43 ------------------f1270d0deb77af03
44 Content-Disposition: form-data; name=\"date\"
46 Wed Dec 18 00:55:39 MST 2013
48 ------------------f1270d0deb77af03
49 Content-Disposition: form-data; name=\"name\"
52 ------------------f1270d0deb77af03--
54 (should 'properly-parse-post-data)))