From af3a3a69f63d138477201e742fb34f0e2f445900 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 14 Feb 2015 02:15:07 -0500 Subject: Trim only whitespace from slurped strings --- test-org-link-edit.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test-org-link-edit.el') diff --git a/test-org-link-edit.el b/test-org-link-edit.el index b778dbd..53c4d87 100644 --- a/test-org-link-edit.el +++ b/test-org-link-edit.el @@ -105,6 +105,14 @@ website is" "\[\[http://orgmode.org/\]\]website" (org-link-edit-forward-slurp-word 1) (buffer-string)))) + ;; Slurp word beginning with non-word, non-whitespace character. + (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 @@ -172,6 +180,14 @@ website is" "Here is\[\[http://orgmode.org/\]\] Org's website" (org-link-edit-backward-slurp-word 1) (buffer-string)))) + ;; Slurp word ending with non-word, non-whitespace character. + (should + (string= + "Here \[\[http://orgmode.org/\]\[is-\]\] Org's website" + (org-test-with-temp-text + "Here is-\[\[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 -- cgit v1.2.3