Evaluate single expression when running tests

This eliminates an extra "nil" value in the response.
This commit is contained in:
Tim Pope 2014-07-12 23:17:30 -04:00
parent d6b3e1c67c
commit 06f6bc5de6

View File

@ -1426,9 +1426,9 @@ augroup END
" Section: Tests " Section: Tests
function! fireplace#capture_test_run(expr, ...) abort function! fireplace#capture_test_run(expr, ...) abort
let expr = '(require ''clojure.test) ' let expr = '(try'
\ . '(try ' \ . ' (require ''clojure.test)'
\ . '(binding [clojure.test/report (fn [m]' \ . ' (binding [clojure.test/report (fn [m]'
\ . ' (case (:type m)' \ . ' (case (:type m)'
\ . ' (:fail :error)' \ . ' (:fail :error)'
\ . ' (let [{file :file line :line test :name} (meta (last clojure.test/*testing-vars*))]' \ . ' (let [{file :file line :line test :name} (meta (last clojure.test/*testing-vars*))]'