Fix resolution of leading-slash links, add link tests (#1108)

Hopefully this solves #1084, "Page links with leading slash lead to a
file in working directory, not a page at the root of the wiki", introduced
in 850aace.

It also adds a set of tests for different kinds of wiki links:

  - api_base_resolve_link.vader
  - link_syntax_markdown.vader
  - link_syntax_vimwiki.vader

Includes some fixes for locally-failing tests, removes a test from
test/map.vader and comments out test/config_vars.vader entirely for the
moment.

Code by : Brennen Bearnes <code@p1k3.com>
This commit is contained in:
Brennen Bearnes
2021-04-06 20:09:37 -06:00
committed by GitHub
parent 618893be00
commit f396e8a494
17 changed files with 484 additions and 124 deletions
@@ -0,0 +1,7 @@
[index](index)
[/index](/index)
[///tmp/some_page](///tmp/some_page)
[//~/testmarkdown/index](//~/testmarkdown/index)
[diary:2020-07-22](diary:2020-07-22)
[link_syntax/nested](link_syntax/nested)
[./link_syntax/nested](./link_syntax/nested)
@@ -0,0 +1,6 @@
[nested](nested)
[/index](/index)
[///tmp/some_page](///tmp/some_page)
[//~/testmarkdown/index](//~/testmarkdown/index)
[diary:2020-07-22](diary:2020-07-22)
[../link_syntax](../link_syntax)
+7
View File
@@ -0,0 +1,7 @@
[[index]]
[[/index]]
[[///tmp/some_page]]
[[//~/testwiki/index]]
[[diary:2020-07-22]]
[[link_syntax/nested]]
[[./link_syntax/nested]]
@@ -0,0 +1,6 @@
[[nested]]
[[/index]]
[[///tmp/some_page]]
[[//~/testwiki/index]]
[[diary:2020-07-22]]
[[../link_syntax]]