emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 0b5adb547f 60/82: Test: Insert full "hyper://"


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 0b5adb547f 60/82: Test: Insert full "hyper://" links
Date: Mon, 25 Sep 2023 19:00:54 -0400 (EDT)

branch: elpa/hyperdrive
commit 0b5adb547ff06bd1d72fdcf0da1327eae15d1629
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Test: Insert full "hyper://" links
---
 tests/test-hyperdrive-org-link.el | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/tests/test-hyperdrive-org-link.el 
b/tests/test-hyperdrive-org-link.el
index f82f0d11e1..141d82ee80 100644
--- a/tests/test-hyperdrive-org-link.el
+++ b/tests/test-hyperdrive-org-link.el
@@ -231,5 +231,25 @@ variables and the expected link."
             ( :let ((org-link-file-path-type 'adaptive))
               :result "[[./foo/bar quux.org::*Heading A][Heading A]]")))
 
-;; TODO: We'll need at least one test for inserting a link into an Org
-;; file that is /not/ in a hyperdrive.
+;;;;;; Insert full "hyper://" links
+
+;; Testing a different drive should stand in for testing
+;; `hyperdrive-org-link-full-url' as well as insertion in
+;; non-hyperdrive buffers, since all of these cases cause
+;; `hyperdrive--org-insert-link-after-advice' to do nothing.
+
+(hyperdrive-test-org-insert-link-deftest 
org-mode-before-heading/different-drive
+  :public-key "fredbeef"
+  :path "/thud.org"
+  :results ((:result "[[hyper://deadbeef/foo/bar%20quux.org]]")))
+
+(hyperdrive-test-org-insert-link-deftest 
org-mode-on-heading-with-custom-id/different-drive
+  :public-key "fredbeef"
+  :path "/thud.org"
+  :results ((:result 
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot][Heading A]]")))
+
+(hyperdrive-test-org-insert-link-deftest 
org-mode-on-heading-no-custom-id/different-drive
+  :public-key "fredbeef"
+  :path "/thud.org"
+  :results
+  ((:result 
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A][Heading A]]")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]