;;; emacs-web-server-test.el --- Test the Emacs Web Server ;; Copyright (C) 2013 Eric Schulte ;; Author: Eric Schulte ;; License: GPLV3 (see the COPYING file in this directory) ;;; TODO: fill in these tests, and then write more ;;; Code: (require 'emacs-web-server) (require 'ert) (ert-deftest ews/keyword-style-handler () "Ensure that a simple keyword-style handler matches correctly." (should t) ; should match one (should-not nil) ; should not match another ) (ert-deftest ews/function-style-handler () "Ensure that a function-style handler matches correctly." (should t) ; should match one (should-not nil) ; should not match another ) (ert-deftest ews/removed-from-ews-servers-after-stop () (should t)) (ert-deftest ews/parse-many-headers () "Test that a number of headers parse successfully." (should t)) (ert-deftest ews/parse-post-data () (let ((post-header "POST / HTTP/1.1 User-Agent: curl/7.33.0 Host: localhost:8080 Accept: */* Content-Length: 273 Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------f1270d0deb77af03 ------------------f1270d0deb77af03 Content-Disposition: form-data; name=\"date\" Wed Dec 18 00:55:39 MST 2013 ------------------f1270d0deb77af03 Content-Disposition: form-data; name=\"name\" \"schulte\" ------------------f1270d0deb77af03-- ")) (should 'properly-parse-post-data)))