[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 18d7821a82 48/82: Test: Add different-drive-dif
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 18d7821a82 48/82: Test: Add different-drive-different-path-* tests |
Date: |
Mon, 25 Sep 2023 19:00:53 -0400 (EDT) |
branch: elpa/hyperdrive
commit 18d7821a828b4fa97521d8a6acef2da3a49f03e5
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Test: Add different-drive-different-path-* tests
---
tests/test-hyperdrive-org-link.el | 110 ++++++++++++++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
diff --git a/tests/test-hyperdrive-org-link.el
b/tests/test-hyperdrive-org-link.el
index 64b7e66e37..3c89b0c69c 100644
--- a/tests/test-hyperdrive-org-link.el
+++ b/tests/test-hyperdrive-org-link.el
@@ -447,6 +447,116 @@
(hyperdrive-org-link-full-url t))
:result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")))
+(hyperdrive-test-org-link-deftest different-drive-different-path-before-heading
+ :store-body "<|>
+* Heading A
+:PROPERTIES:
+:CUSTOM_ID: example ID
+:END:
+* Heading B"
+ :store-from '("deadbeef" . "/foo/bar quux.org")
+ :insert-into '("fredbeef" . "/thud.org")
+ :results (( :let ((org-link-file-path-type 'relative)
+ (hyperdrive-org-link-full-url nil))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")
+ ( :let ((org-link-file-path-type 'relative)
+ (hyperdrive-org-link-full-url t))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")
+
+ ( :let ((org-link-file-path-type 'absolute)
+ (hyperdrive-org-link-full-url nil))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")
+ ( :let ((org-link-file-path-type 'absolute)
+ (hyperdrive-org-link-full-url t))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")
+
+ ( :let ((org-link-file-path-type 'noabbrev)
+ (hyperdrive-org-link-full-url nil))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")
+ ( :let ((org-link-file-path-type 'noabbrev)
+ (hyperdrive-org-link-full-url t))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")
+
+ ( :let ((org-link-file-path-type 'adaptive)
+ (hyperdrive-org-link-full-url nil))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")
+ ( :let ((org-link-file-path-type 'adaptive)
+ (hyperdrive-org-link-full-url t))
+ :result "[[hyper://deadbeef/foo/bar%20quux.org]]")))
+
+(hyperdrive-test-org-link-deftest
different-drive-different-path-on-heading-with-custom-id
+ :store-body "
+* Heading A
+:PROPERTIES:
+:CUSTOM_ID: baz zot
+:END:
+<|>
+* Heading B"
+ :store-from '("deadbeef" . "/foo/bar quux.org")
+ :insert-into '("fredbeef" . "/thud.org")
+ :results (( :let ((org-link-file-path-type 'relative)
+ (hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")
+ ( :let ((org-link-file-path-type 'relative)
+ (hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")
+
+ ( :let ((org-link-file-path-type 'absolute)
+ (hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")
+ ( :let ((org-link-file-path-type 'absolute)
+ (hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")
+
+ ( :let ((org-link-file-path-type 'noabbrev)
+ (hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")
+ ( :let ((org-link-file-path-type 'noabbrev)
+ (hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")
+
+ ( :let ((org-link-file-path-type 'adaptive)
+ (hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")
+ ( :let ((org-link-file-path-type 'adaptive)
+ (hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot]]")))
+
+(hyperdrive-test-org-link-deftest
different-drive-different-path-on-heading-no-custom-id
+ :store-body "
+* Heading A
+<|>
+* Heading B"
+ :store-from '("deadbeef" . "/foo/bar
quux.org")
+ :insert-into '("fredbeef" . "/thud.org")
+ :results (( :let ((org-link-file-path-type
'relative)
+
(hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")
+ ( :let ((org-link-file-path-type
'relative)
+
(hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")
+
+ ( :let ((org-link-file-path-type
'absolute)
+
(hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")
+ ( :let ((org-link-file-path-type
'absolute)
+
(hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")
+
+ ( :let ((org-link-file-path-type
'noabbrev)
+
(hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")
+ ( :let ((org-link-file-path-type
'noabbrev)
+
(hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")
+
+ ( :let ((org-link-file-path-type
'adaptive)
+
(hyperdrive-org-link-full-url nil))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")
+ ( :let ((org-link-file-path-type
'adaptive)
+
(hyperdrive-org-link-full-url t))
+ :result
"[[hyper://deadbeef/foo/bar%20quux.org#%3A%3A%2AHeading%20A]]")))
+
;; * ~CUSTOM_ID~ :: e.g.
;; ~hyper://deadbeef/foo/bar%20quux.org#%3A%3A%23baz%20zot~, which
decodes to ~hyper://deadbeef/foo/bar quux.org#::#baz zot~
- [nongnu] elpa/hyperdrive 06ca835d69 32/82: Tidy: (hyperdrive--org-normalize-link) Add blank spaces, (continued)
- [nongnu] elpa/hyperdrive 06ca835d69 32/82: Tidy: (hyperdrive--org-normalize-link) Add blank spaces, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 341f145411 33/82: Add: (hyperdrive--ensure-dot-slash-prefix-path), ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 696908c87f 35/82: Change: (--org-normalize-link) Remove hyperdrive-entry-equal-p check, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 82f8b9d502 37/82: Fix: (--org-normalize-link) Use current entry, not target entry, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 2a611e471f 42/82: Change: (--org-normalize-link) Add search-option to path link, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 9fd2272ec1 47/82: Change: (--org-shorthand-link) Don't handle full "hyper://" URLs, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive a7bfbf8dee 38/82: Test: -org-link/same-drive-different-path-before-heading, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 04de0cb01a 44/82: Change: (hyperdrive--org-normalize-link) Check search-option first, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 16cdce78bf 40/82: Comment: Add TODO, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 6aa9346618 41/82: Comment: Add TODO, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 18d7821a82 48/82: Test: Add different-drive-different-path-* tests,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 360c7d860f 49/82: Add: (hyperdrive--org-link-description) Utility function, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 3ea6fa6bc1 51/82: Comment: Correct explanation, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 1fb11bed18 50/82: Fix: (hyperdrive--org-insert-link-after-advice) Preserve description, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 505ee2626b 45/82: Change: (hyperdrive--format-entry-url) Hardcode fragment-prefix to #, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 923b1e6371 62/82: Comment: Remove "ing", ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 0b5adb547f 60/82: Test: Insert full "hyper://" links, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive dd795f5f2a 53/82: Test: Add tests for storing links, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 990d23ab55 57/82: Test: Rename org-mode/* to org-mode-*, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive dc8af9b72c 59/82: Test: Remove roundtrip tests, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive d704c5a181 64/82: Meta: Update changelog, ELPA Syncer, 2023/09/25