diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-14 02:12:47 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-14 02:12:47 -0500 |
commit | cb6c7d8b3feeb869dc7218f9686461d2ede3aaac (patch) | |
tree | 875fbd40aaef38b0ab01ccd885c076e8854d6d61 /test-org-link-edit.el | |
parent | a8b65ff0682019ab912ebc1a3693262d9dd501d6 (diff) | |
download | org-link-edit-cb6c7d8b3feeb869dc7218f9686461d2ede3aaac.tar.gz |
backward-slurp-word: Fix whitespace check
Don't fail when there is no description and the slurped word isn't
separated by a non-word character.
Diffstat (limited to 'test-org-link-edit.el')
-rw-r--r-- | test-org-link-edit.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test-org-link-edit.el b/test-org-link-edit.el index 7c2a914..b778dbd 100644 --- a/test-org-link-edit.el +++ b/test-org-link-edit.el @@ -97,6 +97,14 @@ otherwise place the point at the beginning of the inserted text." website is" (org-link-edit-forward-slurp-word 1) (buffer-string)))) + ;; Slurp word that has no whitespace. + (should + (string= + "\[\[http://orgmode.org/\]\[website\]\]" + (org-test-with-temp-text + "\[\[http://orgmode.org/\]\]website" + (org-link-edit-forward-slurp-word 1) + (buffer-string)))) ;; Slurp beyond the number of present words. (should-error (org-test-with-temp-text @@ -156,6 +164,14 @@ website is" <point>\[\[http://orgmode.org/\]\[Org's website\]\]" (org-link-edit-backward-slurp-word 1) (buffer-string)))) + ;; Slurp word that has no whitespace. + (should + (string= + "Here \[\[http://orgmode.org/\]\[is\]\] Org's website" + (org-test-with-temp-text + "Here is<point>\[\[http://orgmode.org/\]\] Org's website" + (org-link-edit-backward-slurp-word 1) + (buffer-string)))) ;; Slurp beyond the number of present words. (should-error (org-test-with-temp-text |