tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

.RunTests unable to find aliased deftest #403

Open mbutlerw opened 2 years ago

mbutlerw commented 2 years ago

Hi,

Invoking RunTests as :.RunTests within an aliased deftest appears to go and find the previous unaliased def/defn/deftest and passes that to clojure.test/test-vars, rather than the deftest you are within.

(ns foo-test
  (:require [clojure.test :as t :refer [deftest]]))

(deftest refered-test
  (t/is true))

(defn foo [] inc)

(def bar 1)

(t/deftest aliased-test
  (t/is false))

;; Calling :.RunTests while inside aliased-test
;; => (clojure.test/test-vars [#'foo-test/bar])

Apologies if this is a misunderstanding on my part, and thanks for all your work on fireplace :+1: