Skip to content

Commit

Permalink
Test epc:test-epc-error using ert
Browse files Browse the repository at this point in the history
  • Loading branch information
niku committed Jan 8, 2016
1 parent 7eabd0b commit a0eb155
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test-epc.el
Expand Up @@ -164,7 +164,7 @@
(deferred:watch it dfinish)
(deferred:sync! it))))

(defun epc:test-epc-error ()
(ert-deftest epc:test-epc-error ()
(epc:with-self-server-client
(lambda (mngr) ) ; nothing
(deferred:$
Expand All @@ -173,12 +173,10 @@
(deferred:error it
(lambda (x)
(destructuring-bind (sym msg) x
(if (and (eq sym 'epc-error)
(string-match "^EPC-ERROR:" msg)) t
(format "Return : [%S]" x)))))
(deferred:watch it dfinish))))

;; (cc:debug (epc:test-epc-error) "epc-error %S" x)
(should (and (eq sym 'epc-error)
(string-match "^EPC-ERROR:" msg))))))
(deferred:watch it dfinish)
(deferred:sync! it))))

(defun epc:test-epc-methods ()
(epc:with-self-server-client
Expand Down

0 comments on commit a0eb155

Please sign in to comment.