From 8bc79f9ef3722f776654de7a3a00a5e0af25d62d Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 8 Oct 2023 10:13:15 -0400 Subject: [PATCH] Add tests for angle links. --- .../object/angle_link/application.org | 2 ++ .../object/angle_link/code_ref_link.org | 13 ++++++++++ .../object/angle_link/custom_id_link.org | 6 +++++ org_mode_samples/object/angle_link/elisp.org | 1 + .../object/angle_link/file_link.org | 21 ++++++++++++++++ .../object/angle_link/fuzzy_link.org | 6 +++++ .../object/angle_link/id_link.org | 6 +++++ .../object/angle_link/multiple_slashes.org | 20 +++++++++++++++ .../object/angle_link/protocol_link.org | 6 +++++ .../object/angle_link/search_option.org | 16 ++++++++++++ org_mode_samples/object/angle_link/simple.org | 1 + .../object/angle_link/template.org | 6 +++++ .../object/angle_link/with_parenthesis.org | 1 + .../object/plain_link/search_option.org | 3 +-- .../object/regular_link/all_default_links.org | 25 +++++++++++++++++++ .../object/regular_link/search_option.org | 18 +++++++++++-- 16 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 org_mode_samples/object/angle_link/application.org create mode 100644 org_mode_samples/object/angle_link/code_ref_link.org create mode 100644 org_mode_samples/object/angle_link/custom_id_link.org create mode 100644 org_mode_samples/object/angle_link/elisp.org create mode 100644 org_mode_samples/object/angle_link/file_link.org create mode 100644 org_mode_samples/object/angle_link/fuzzy_link.org create mode 100644 org_mode_samples/object/angle_link/id_link.org create mode 100644 org_mode_samples/object/angle_link/multiple_slashes.org create mode 100644 org_mode_samples/object/angle_link/protocol_link.org create mode 100644 org_mode_samples/object/angle_link/search_option.org create mode 100644 org_mode_samples/object/angle_link/simple.org create mode 100644 org_mode_samples/object/angle_link/template.org create mode 100644 org_mode_samples/object/angle_link/with_parenthesis.org create mode 100644 org_mode_samples/object/regular_link/all_default_links.org diff --git a/org_mode_samples/object/angle_link/application.org b/org_mode_samples/object/angle_link/application.org new file mode 100644 index 0000000..2463473 --- /dev/null +++ b/org_mode_samples/object/angle_link/application.org @@ -0,0 +1,2 @@ + + diff --git a/org_mode_samples/object/angle_link/code_ref_link.org b/org_mode_samples/object/angle_link/code_ref_link.org new file mode 100644 index 0000000..0de621d --- /dev/null +++ b/org_mode_samples/object/angle_link/code_ref_link.org @@ -0,0 +1,13 @@ +<(foo)> + +<((bar))> + +<((baz)> + +<(lo +rem)> + +# These become fuzzy +<(foo) > +< (foo)> +<(foo)::3> diff --git a/org_mode_samples/object/angle_link/custom_id_link.org b/org_mode_samples/object/angle_link/custom_id_link.org new file mode 100644 index 0000000..89c9511 --- /dev/null +++ b/org_mode_samples/object/angle_link/custom_id_link.org @@ -0,0 +1,6 @@ +<#foo> + +<#fo +o> + +<#foo::3> diff --git a/org_mode_samples/object/angle_link/elisp.org b/org_mode_samples/object/angle_link/elisp.org new file mode 100644 index 0000000..3797082 --- /dev/null +++ b/org_mode_samples/object/angle_link/elisp.org @@ -0,0 +1 @@ + diff --git a/org_mode_samples/object/angle_link/file_link.org b/org_mode_samples/object/angle_link/file_link.org new file mode 100644 index 0000000..c2e8bb8 --- /dev/null +++ b/org_mode_samples/object/angle_link/file_link.org @@ -0,0 +1,21 @@ +<./simple.org> +<../simple.org> + + + + + + + + + + + + + + + diff --git a/org_mode_samples/object/angle_link/fuzzy_link.org b/org_mode_samples/object/angle_link/fuzzy_link.org new file mode 100644 index 0000000..ab7844f --- /dev/null +++ b/org_mode_samples/object/angle_link/fuzzy_link.org @@ -0,0 +1,6 @@ + + + + + diff --git a/org_mode_samples/object/angle_link/id_link.org b/org_mode_samples/object/angle_link/id_link.org new file mode 100644 index 0000000..cc17de4 --- /dev/null +++ b/org_mode_samples/object/angle_link/id_link.org @@ -0,0 +1,6 @@ + + + + + diff --git a/org_mode_samples/object/angle_link/multiple_slashes.org b/org_mode_samples/object/angle_link/multiple_slashes.org new file mode 100644 index 0000000..9ddc6b3 --- /dev/null +++ b/org_mode_samples/object/angle_link/multiple_slashes.org @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/org_mode_samples/object/angle_link/protocol_link.org b/org_mode_samples/object/angle_link/protocol_link.org new file mode 100644 index 0000000..bb1ff75 --- /dev/null +++ b/org_mode_samples/object/angle_link/protocol_link.org @@ -0,0 +1,6 @@ + + + + + diff --git a/org_mode_samples/object/angle_link/search_option.org b/org_mode_samples/object/angle_link/search_option.org new file mode 100644 index 0000000..d0d07ed --- /dev/null +++ b/org_mode_samples/object/angle_link/search_option.org @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/org_mode_samples/object/angle_link/simple.org b/org_mode_samples/object/angle_link/simple.org new file mode 100644 index 0000000..4e2e8b8 --- /dev/null +++ b/org_mode_samples/object/angle_link/simple.org @@ -0,0 +1 @@ + diff --git a/org_mode_samples/object/angle_link/template.org b/org_mode_samples/object/angle_link/template.org new file mode 100644 index 0000000..b04d5b4 --- /dev/null +++ b/org_mode_samples/object/angle_link/template.org @@ -0,0 +1,6 @@ +#+LINK: foo https://foo.bar/baz#%s + + + +#+LINK: cat dog%s + diff --git a/org_mode_samples/object/angle_link/with_parenthesis.org b/org_mode_samples/object/angle_link/with_parenthesis.org new file mode 100644 index 0000000..f1e0401 --- /dev/null +++ b/org_mode_samples/object/angle_link/with_parenthesis.org @@ -0,0 +1 @@ + diff --git a/org_mode_samples/object/plain_link/search_option.org b/org_mode_samples/object/plain_link/search_option.org index d9e1631..7c39568 100644 --- a/org_mode_samples/object/plain_link/search_option.org +++ b/org_mode_samples/object/plain_link/search_option.org @@ -7,8 +7,7 @@ bar file:simple.org::foo::bar file:simple.org::/foo/ -# Does not become a search option because it is inside parenthesis. -https://en.wikipedia.org/wiki/Shebang_(Uni::x) +file://en.wikipedia.org/wiki/Shebang_(Uni::x) file:simple.org::* foo diff --git a/org_mode_samples/object/regular_link/all_default_links.org b/org_mode_samples/object/regular_link/all_default_links.org new file mode 100644 index 0000000..e09deb5 --- /dev/null +++ b/org_mode_samples/object/regular_link/all_default_links.org @@ -0,0 +1,25 @@ +non-link text +[[eww://foo]] +[[rmail://foo]] +[[mhe://foo]] +[[irc://foo]] +[[info://foo]] +[[gnus://foo]] +[[docview://foo]] +[[bibtex://foo]] +[[bbdb://foo]] +[[w3m://foo]] +[[doi://foo]] +[[file+sys://foo]] +[[file+emacs://foo]] +[[shell://foo]] +[[news://foo]] +[[mailto://foo]] +[[https://foo]] +[[http://foo]] +[[ftp://foo]] +[[help://foo]] +[[file://foo]] +[[elisp://foo]] +[[randomfakeprotocl://foo]] +non-link text diff --git a/org_mode_samples/object/regular_link/search_option.org b/org_mode_samples/object/regular_link/search_option.org index aba6af0..c273457 100644 --- a/org_mode_samples/object/regular_link/search_option.org +++ b/org_mode_samples/object/regular_link/search_option.org @@ -1,2 +1,16 @@ -# Does not become a search option because it is inside parenthesis. -[[https://en.wikipedia.org/wiki/Shebang_(Uni::x)]] +[[file:simple.org::foo]] + +[[file:simple.org::#foo]] +[[file:simple.org::foo bar]] +[[file:simple.org::foo +bar]] +[[file:simple.org::foo::bar]] +[[file:simple.org::/foo/]] + +[[file://en.wikipedia.org/wiki/Shebang_(Uni::x)]] + + +[[file:simple.org::*]] +[[file:simple.org::* foo]] +[[file:simple.org::*bar]] +[[file:simple.org::b*az]]