Skip to content

Commit

Permalink
fix for running test at point
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoduncan authored and technomancy committed Mar 6, 2010
1 parent 865ce3d commit 268d25d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions clojure-test-mode.el
Expand Up @@ -253,16 +253,17 @@ Retuns the problem overlay if such a position is found, otherwise nil."
(save-some-buffers nil (lambda () (equal major-mode 'clojure-mode)))
(clojure-test-clear
(lambda (&rest args)
(let ((test-name (first (which-function))))
(let* ((f (which-function))
(test-name (if (listp f) (first f) f)))
(slime-eval-async
`(swank:interactive-eval
,(format "(do (load-file \"%s\")
(when (:test ^#'%s) (%s) (cons nil (:status ^#'%s))))"
(buffer-file-name) test-name test-name test-name))
(when (:test (meta (var %s))) (%s) (cons (:name (meta (var %s))) (:status (meta (var %s))))))"
(buffer-file-name) test-name test-name test-name test-name))
(lambda (result-str)
(let ((result (read result-str)))
(if (cdr result)
(clojure-test-extract-result result)
(clojure-test-extract-result result)
(message "Not in a test.")))))))))

(defun clojure-test-show-result ()
Expand Down

0 comments on commit 268d25d

Please sign in to comment.