[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 27/119: run test processes asynch
From: |
Eric Schulte |
Subject: |
[elpa] 27/119: run test processes asynch |
Date: |
Mon, 10 Mar 2014 16:57:08 +0000 |
eschulte pushed a commit to branch master
in repository elpa.
commit 40541d97e366d9f853dc386aa37dde29dc1c23db
Author: Eric Schulte <address@hidden>
Date: Thu Dec 19 20:34:44 2013 -0700
run test processes asynch
---
emacs-web-server-test.el | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/emacs-web-server-test.el b/emacs-web-server-test.el
index eb1fda8..594d0c2 100644
--- a/emacs-web-server-test.el
+++ b/emacs-web-server-test.el
@@ -13,6 +13,18 @@
(eval-when-compile (require 'cl))
(require 'ert)
+(defun ews-test-run-asynch (continuation program &rest program-args)
+ (let* ((buffer (generate-new-buffer "*ews-test-run-asynch*"))
+ (proc (apply #'start-process "ews-test" buffer program program-args)))
+ (set-process-sentinel proc
+ (lexical-let ((cont continuation)
+ (buf buffer))
+ (lambda (proc signal)
+ (when (memq (process-status proc) '(exit signal))
+ (funcall cont (prog1 (with-current-buffer buf
+ (buffer-string))
+ (kill-buffer buf)))))))))
+
(ert-deftest ews/keyword-style-handler ()
"Ensure that a simple keyword-style handler matches correctly."
(should t) ; should match one
- [elpa] 16/119: tasks, (continued)
- [elpa] 16/119: tasks, Eric Schulte, 2014/03/10
- [elpa] 20/119: don't require non-nil return to close connection, Eric Schulte, 2014/03/10
- [elpa] 19/119: simply (name . content) for form elements, Eric Schulte, 2014/03/10
- [elpa] 21/119: helper to send a file with mime type, Eric Schulte, 2014/03/10
- [elpa] 22/119: file serving example, Eric Schulte, 2014/03/10
- [elpa] 23/119: handle close-connection thrown during header parse, Eric Schulte, 2014/03/10
- [elpa] 25/119: seems to be generally usable, added a README, Eric Schulte, 2014/03/10
- [elpa] 24/119: parse application/x-www-form-urlencoded post data, Eric Schulte, 2014/03/10
- [elpa] 26/119: thread proc through some functions, Eric Schulte, 2014/03/10
- [elpa] 28/119: testing a hello-world server, Eric Schulte, 2014/03/10
- [elpa] 27/119: run test processes asynch,
Eric Schulte <=
- [elpa] 29/119: update examples, Eric Schulte, 2014/03/10
- [elpa] 31/119: match more HTTP methods, Eric Schulte, 2014/03/10
- [elpa] 30/119: fleshed out some more tests, Eric Schulte, 2014/03/10
- [elpa] 32/119: url-encoded parameters, Eric Schulte, 2014/03/10
- [elpa] 34/119: found a confounding POST example, Eric Schulte, 2014/03/10
- [elpa] 33/119: ews-subdirectoryp convenience function, Eric Schulte, 2014/03/10
- [elpa] 36/119: bug fix, Eric Schulte, 2014/03/10
- [elpa] 35/119: cleaned up header/param parsing, Eric Schulte, 2014/03/10
- [elpa] 37/119: fixed tests, running and passing, Eric Schulte, 2014/03/10
- [elpa] 39/119: removed extra comments from examples, Eric Schulte, 2014/03/10