diff options
author | Bastien Guerry <bzg@altern.org> | 2014-06-02 22:33:28 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-06-02 22:33:28 +0200 |
commit | ad567e877b00a0cd64857710c4cc10e23e220843 (patch) | |
tree | baf842b708c19370a94c0c94e2c4a6ce27c5bed2 | |
parent | 8e72c8fcfaa8dc04750e374eae455802aed7598f (diff) | |
download | org-mode-ad567e877b00a0cd64857710c4cc10e23e220843.tar.gz |
testing/lisp/test-org.el: Update tests
* testing/lisp/test-org.el
(test-org/open-at-point-in-property): Rename from
`test-org/open-at-point'. Only test whether
`org-open-at-point' does not throw an error.
(test-org/open-at-point-in-comment)
(test-org/open-at-point/info): New tests.
-rw-r--r-- | testing/lisp/test-org.el | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 94dab8e..005db35 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -924,7 +924,6 @@ (org-open-at-point) (bobp)))) - ;;;; Link Escaping (ert-deftest test-org/org-link-escape-ascii-character () @@ -1015,20 +1014,33 @@ drops support for Emacs 24.1 and 24.2." ;;;; Open at point -(ert-deftest test-org/open-at-point () - "Test `org-open-at-point' with link being a heading property." +(ert-deftest test-org/open-at-point-in-property () + "Does `org-open-at-point' open link in property drawer?" (should - (org-test-with-temp-text - "* Headline + (org-test-with-temp-text + "* Headline :PROPERTIES: :URL: <point>[[info:org#Top]] :END:" - (org-open-at-point) - (and (switch-to-buffer "*info*") - (prog1 - (looking-at "\nOrg Mode Manual") - (kill-buffer)))))) + (org-open-at-point) t))) +(ert-deftest test-org/open-at-point-in-comment () + "Does `org-open-at-point' open link in a commented line?" + (should + (org-test-with-temp-text + "# <point>[[info:org#Top]]" + (org-open-at-point) t))) + +(ert-deftest test-org/open-at-point/info () + "Test `org-open-at-point' on info links." + (should + (org-test-with-temp-text + "<point>[[info:org#Top]]" + (org-open-at-point) + (and (switch-to-buffer "*info*") + (prog1 + (looking-at "\nOrg Mode Manual") + (kill-buffer)))))) ;;; Node Properties |