[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 6300e0e 84/85: test-org-protocol.el: Decode "+" to
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 6300e0e 84/85: test-org-protocol.el: Decode "+" to " " tests |
Date: |
Mon, 27 Sep 2021 15:57:56 -0400 (EDT) |
branch: externals/org
commit 6300e0ebef3b42204af354cc1c241c7de698fefc
Author: Max Nikulin <manikulin@gmail.com>
Commit: Bastien <bzg@gnu.org>
test-org-protocol.el: Decode "+" to " " tests
testing/lisp/test-org-protocol.el
(test-org-protocol/org-protocol-store-link)
(test-org-protocol/org-protocol-capture): Cases to check that "+" is
decoded to space in query parameters (new style of URIs) but preserved
in path components (old style of org-protocol links).
---
testing/lisp/test-org-protocol.el | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/testing/lisp/test-org-protocol.el
b/testing/lisp/test-org-protocol.el
index d33052b..95fc7f8 100644
--- a/testing/lisp/test-org-protocol.el
+++ b/testing/lisp/test-org-protocol.el
@@ -76,7 +76,15 @@
;; New link style
(let ((uri
"/some/directory/org-protocol://store-link?url=URL3&title=TITLE3"))
(should (null (org-protocol-check-filename-for-protocol uri (list uri)
nil)))
- (should (equal (car org-stored-links) '("URL3" "TITLE3")))))
+ (should (equal (car org-stored-links) '("URL3" "TITLE3"))))
+ ;; Do not decode "+" in old-style link
+ (let ((uri "/org-protocol:/store-link:/one+one/plus+preserved"))
+ (should (null (org-protocol-check-filename-for-protocol uri (list uri)
nil)))
+ (should (equal (car org-stored-links) '("one+one" "plus+preserved"))))
+ ;; Decode "+" to space in new-style link
+ (let ((uri "/org-protocol:/store-link/?url=one+two&title=plus+is+space"))
+ (should (null (org-protocol-check-filename-for-protocol uri (list uri)
nil)))
+ (should (equal (car org-stored-links) '("one two" "plus is space")))))
(ert-deftest test-org-protocol/org-protocol-store-link-file ()
"store-link: `org-protocol-sanitize-uri' could distort URL."
@@ -133,6 +141,12 @@
;; - query parameters, not sure how to include them in template
("/some/directory/org-protocol:/capture?template=x&url=URL&title=TITLE&body=BODY&from=example"
. "** SOMEDAY\n\nBODY\n\n[[URL][TITLE]]\n")
+ ;; - "+" is not decoded to space in old-style URIs
+
("/org-protocol:/capture:/t/https%3A%2F%2Forgmode.org%2Fsome+thing/org+mode/Body+plus"
+ . "**
TODO\n\nBody+plus\n\n[[https://orgmode.org/some+thing][org+mode]]\n")
+ ;; - decode "+" to space
+
("/org-protocol:/capture?template=t&url=URL&title=Mailing+list&body=Body+no+plus"
+ . "** TODO\n\nBody no plus\n\n[[URL][Mailing list]]\n")
)))
;; Old link style
(mapc
- [elpa] externals/org ca441be 71/85: lisp/oc.el: Fix typo in comment string, (continued)
- [elpa] externals/org ca441be 71/85: lisp/oc.el: Fix typo in comment string, ELPA Syncer, 2021/09/27
- [elpa] externals/org db167b9 81/85: Do not use mark-whole-buffer noninteractively, ELPA Syncer, 2021/09/27
- [elpa] externals/org c80fea7 82/85: lisp/oc.el: Fix docstring wrapping, ELPA Syncer, 2021/09/27
- [elpa] externals/org 2d2f774 16/85: Merge branch 'bugfix', ELPA Syncer, 2021/09/27
- [elpa] externals/org b967a05 24/85: org-indent: Allow indentation per level to be 0, ELPA Syncer, 2021/09/27
- [elpa] externals/org e0bf528 30/85: CONTRIBUTE: Update to follow the new structure of doc/, ELPA Syncer, 2021/09/27
- [elpa] externals/org bf1c4c7 22/85: Include support for evaluating julia code, ELPA Syncer, 2021/09/27
- [elpa] externals/org c0ca5e3 29/85: CONTRIBUTE: Fix typo, ELPA Syncer, 2021/09/27
- [elpa] externals/org 4651121 45/85: Merge branch 'bugfix', ELPA Syncer, 2021/09/27
- [elpa] externals/org 98fd6d5 56/85: Remove references to deleted packages, ELPA Syncer, 2021/09/27
- [elpa] externals/org 6300e0e 84/85: test-org-protocol.el: Decode "+" to " " tests,
ELPA Syncer <=
- [elpa] externals/org 4b7d80c 50/85: Add faces to improve contextuality of agenda views, ELPA Syncer, 2021/09/27
- [elpa] externals/org d74a824 54/85: org.el (org-fontify-extend-region): Fix headline fontification in edge case, ELPA Syncer, 2021/09/27
- [elpa] externals/org 54c2327 49/85: Allow :var header args to be assigned to cons cells, ELPA Syncer, 2021/09/27
- [elpa] externals/org e0535fa 39/85: ob-sql.el (org-babel-expand-body:sql): Support :prologue :epilogue, ELPA Syncer, 2021/09/27
- [elpa] externals/org ef66170 42/85: Merge branch 'bugfix', ELPA Syncer, 2021/09/27
- [elpa] externals/org 578d99b 57/85: lisp/ob-tangle.el: Add variable declaration, ELPA Syncer, 2021/09/27
- [elpa] externals/org c21dceb 61/85: lisp/org.el: Fix some compiler warnings, ELPA Syncer, 2021/09/27
- [elpa] externals/org 41f7609 67/85: ob-core: Make recent change compatible with older Emacs versions, ELPA Syncer, 2021/09/27
- [elpa] externals/org c12a159 78/85: ORG-NEWS: Mention proportional image width display, ELPA Syncer, 2021/09/27