summaryrefslogtreecommitdiff
path: root/test/cider-locals-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/cider-locals-tests.el')
-rw-r--r--test/cider-locals-tests.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/cider-locals-tests.el b/test/cider-locals-tests.el
index a9a12272..9706dc51 100644
--- a/test/cider-locals-tests.el
+++ b/test/cider-locals-tests.el
@@ -93,5 +93,17 @@
("a" "b" "the-ns")
(cider--read-locals-from-arglist)))
+(ert-deftest cider--test-unless-local ()
+ (with-temp-buffer
+ (clojure-mode)
+ (insert (propertize "the-ns inc lalala" 'cider-locals '("inc" "x")))
+ (goto-char (point-min))
+ (search-forward-regexp "\\(\\sw\\|\\s_\\)+" nil 'noerror)
+ (should (cider--unless-local-match t))
+ (search-forward-regexp "\\(\\sw\\|\\s_\\)+" nil 'noerror)
+ (should-not (cider--unless-local-match t))
+ (search-forward-regexp "\\(\\sw\\|\\s_\\)+" nil 'noerror)
+ (should (cider--unless-local-match t))))
+
(provide 'cider-locals-tests)
;;; cider-locals-tests.el ends here