aboutsummaryrefslogtreecommitdiff
path: root/test-org-link-edit.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-05-05 19:28:42 -0400
committerKyle Meyer <kyle@kyleam.com>2017-05-05 19:28:42 -0400
commit8cdff0424851104934d3ede09144968f842c1e45 (patch)
treed45dadc36c8020b728c9cea41c1479164632f219 /test-org-link-edit.el
parent2c2a5bc8de94fac1e396a75d05ae9daa2104b1bc (diff)
downloadorg-link-edit-8cdff0424851104934d3ede09144968f842c1e45.tar.gz
tests/transport-next-link: Describe test cases
Diffstat (limited to 'test-org-link-edit.el')
-rw-r--r--test-org-link-edit.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test-org-link-edit.el b/test-org-link-edit.el
index bf3435b..44d7204 100644
--- a/test-org-link-edit.el
+++ b/test-org-link-edit.el
@@ -515,18 +515,21 @@ website"
(ert-deftest test-org-link-edit/transport-next-link ()
"Test `org-link-edit-transport-next-link'."
+ ;; Transport next link to word at point.
(should
(string= "Here is \[\[http://orgmode.org/\]\[Org's\]\] website "
(org-test-with-temp-text
"Here is <point>Org's website http://orgmode.org/"
(org-link-edit-transport-next-link)
(buffer-string))))
+ ;; Transport previous link to word at point.
(should
(string= " Here is \[\[http://orgmode.org/\]\[Org's\]\] website"
(org-test-with-temp-text
"http://orgmode.org/ Here is <point>Org's website"
(org-link-edit-transport-next-link 'previous)
(buffer-string))))
+ ;; Transport next link to the active region.
(should
(string= "\[\[http://orgmode.org/\]\[Here is Org's\]\] website "
(org-test-with-temp-text
@@ -534,6 +537,7 @@ website"
(org-link-edit-transport-next-link
nil (point-min) (point))
(buffer-string))))
+ ;; Transport previous link to the active region.
(should
(string= " Here is \[\[http://orgmode.org/\]\[Org's website\]\]"
(org-test-with-temp-text
@@ -541,6 +545,7 @@ website"
(org-link-edit-transport-next-link
'previous (point) (point-max))
(buffer-string))))
+ ;; Fail if point is on a link.
(should-error
(org-test-with-temp-text
"Here is Org's website http://orgmode.org/<point>"