File tree 3 files changed +29
-0
lines changed
3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ (ns refactor-nrepl.find-symbol-test
2
+ (:require
3
+ [clojure.test :refer [deftest is]]
4
+ [refactor-nrepl.unreadable-files :refer [ignore-errors-str]]
5
+ [refactor-nrepl.find.find-symbol :as sut])
6
+ (:import
7
+ (java.io File)))
8
+
9
+ (def from-file-path
10
+ (-> " testproject/src/com/move/ns_to_be_moved.clj" File. .getAbsolutePath))
11
+
12
+ (deftest works
13
+ (let [found (sut/find-symbol {:file from-file-path
14
+ :ns " com.move.ns-to-be-moved"
15
+ :line 11
16
+ :column 7
17
+ :name " fn-to-be-moved"
18
+ :ignore-errors ignore-errors-str
19
+ :dir " testproject/src" })]
20
+ (is (seq found)
21
+ (pr-str found))
22
+ (is (= 4 (->> found (map :file ) distinct count))
23
+ " Finds different files with references to the queried symbol" )))
Original file line number Diff line number Diff line change 7
7
8
8
(defn from-registry [k]
9
9
(k four/registry))
10
+
11
+ ; ; Tries reproducing https://github.com/clojure-emacs/clj-refactor.el/issues/485
12
+ (set! *warn-on-reflection* true )
Original file line number Diff line number Diff line change 1
1
(ns com.move.ns-to-be-moved )
2
2
3
+ ; ; Tries reproducing https://github.com/clojure-emacs/clj-refactor.el/issues/485
4
+ (set! *warn-on-reflection* true )
5
+
3
6
(def var-to-be-moved )
4
7
(def ^:private private-var-to-be-moved )
5
8
You can’t perform that action at this time.
0 commit comments