File tree Expand file tree Collapse file tree 1 file changed +20
-18
lines changed
Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change 7676 (newline-and-indent )))
7777
7878(ert-deftest clojure-find-ns-test ()
79- (with-temp-buffer
80- (insert " (ns ^{:doc \" Some docs\" }\n foo-bar)" )
81- (newline )
82- (newline )
83- (insert " (in-ns 'baz-quux)" )
84- (clojure-mode)
85-
86- ; ; From inside docstring of first ns
87- (goto-char 18 )
88- (should (equal " foo-bar" (clojure-find-ns)))
89-
90- ; ; From inside first ns's name, on its own line
91- (goto-char 29 )
92- (should (equal " foo-bar" (clojure-find-ns)))
93-
94- ; ; From inside second ns's name
95- (goto-char 42 )
96- (should (equal " baz-quux" (clojure-find-ns)))))
79+ ; ; we should not cache the results of `clojure-find-ns' here
80+ (let ((clojure-cache-ns nil ))
81+ (with-temp-buffer
82+ (insert " (ns ^{:doc \" Some docs\" }\n foo-bar)" )
83+ (newline )
84+ (newline )
85+ (insert " (in-ns 'baz-quux)" )
86+ (clojure-mode)
87+
88+ ; ; From inside docstring of first ns
89+ (goto-char 18 )
90+ (should (equal " foo-bar" (clojure-find-ns)))
91+
92+ ; ; From inside first ns's name, on its own line
93+ (goto-char 29 )
94+ (should (equal " foo-bar" (clojure-find-ns)))
95+
96+ ; ; From inside second ns's name
97+ (goto-char 42 )
98+ (should (equal " baz-quux" (clojure-find-ns))))))
9799
98100(provide 'clojure-mode-sexp-test )
99101
You can’t perform that action at this time.
0 commit comments