Permalink
Browse files

Add tests for jedi:epc-server--title

  • Loading branch information...
tkf committed Mar 7, 2013
1 parent d6936b4 commit 88cb5a1cca2f9e7d4c6dcd2254bf5b4bd1f0a70b
Showing with 19 additions and 0 deletions.
  1. +19 −0 test-jedi.el
View
@@ -94,6 +94,25 @@
(should (stringp module_path)))))
+;;; EPC utils
+
+(defun jedi-testing:epc-server--title-check (command title)
+ (let ((copy (mapcar #'identity command)))
+ (should (equal (jedi:epc-server--title command) title))
+ ;; COMMAND must not be modified in-place.
+ (should (equal command copy))))
+
+(ert-deftest jedi:epc-server--title/0 ()
+ (jedi-testing:epc-server--title-check
+ '("python" "jediepcserver.py")
+ "Jedi: python ..."))
+
+(ert-deftest jedi:epc-server--title/1 ()
+ (jedi-testing:epc-server--title-check
+ '("env/bin/python3" "jedi/jediepcserver.py" "--opt")
+ "Jedi: python3 ... --opt"))
+
+
;;; Server pool
(defmacro jedi-testing:with-mocked-server (start-epc-records

0 comments on commit 88cb5a1

Please sign in to comment.