summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-10 12:41:54 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-10 12:41:54 +0200
commitfebab2fedb93b8b589e91e6e733ffbd7e2937e7b (patch)
treec964521e2965f7bf5f0fb1fa5a6f60d6ef6100c3
parent313d22dec6cf661f9d2dde272d66e747502206e6 (diff)
downloadorg-mode-febab2fedb93b8b589e91e6e733ffbd7e2937e7b.tar.gz
Add test for `org-open-at-point'
* testing/lisp/test-org.el (test-org/open-at-point/tag): New test.
-rw-r--r--testing/lisp/test-org.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index a952c80..e8512b9 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -2366,6 +2366,23 @@ http://article.gmane.org/gmane.emacs.orgmode/21459/"
(org-open-at-point)
(eq (org-element-type (org-element-context)) 'radio-target))))
+(ert-deftest test-org/open-at-point/tag ()
+ "Test `org-open-at-point' on tags."
+ (should
+ (org-test-with-temp-text "* H :<point>tag:"
+ (catch :result
+ (cl-letf (((symbol-function 'org-tags-view)
+ (lambda (&rest args) (throw :result t))))
+ (org-open-at-point)
+ nil))))
+ (should-not
+ (org-test-with-temp-text-in-file "* H<point> :tag:"
+ (catch :result
+ (cl-letf (((symbol-function 'org-tags-view)
+ (lambda (&rest args) (throw :result t))))
+ (org-open-at-point)
+ nil)))))
+
;;;; Stored links
(ert-deftest test-org/store-link ()