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:
@@ -29,6 +29,8 @@ Expect (The links with a header):
|
||||
= Generated Links =
|
||||
- [[buzz_bozz]]
|
||||
- [[index]]
|
||||
- [[link_syntax]]
|
||||
- [[link_syntax/nested]]
|
||||
|
||||
Execute (VimwikiGenerateLinks x 2):
|
||||
edit $HOME/testwiki/Test.wiki
|
||||
@@ -42,6 +44,8 @@ Expect (The links with a header (bis)):
|
||||
= Generated Links =
|
||||
- [[buzz_bozz]]
|
||||
- [[index]]
|
||||
- [[link_syntax]]
|
||||
- [[link_syntax/nested]]
|
||||
|
||||
Last Line
|
||||
|
||||
@@ -75,6 +79,8 @@ Expect (The links with a header):
|
||||
|
||||
- [Buzz Bozz](buzz_bozz)
|
||||
- [Test Wiki](index)
|
||||
- [link_syntax](link_syntax)
|
||||
- [link_syntax/nested](link_syntax/nested)
|
||||
|
||||
Do (Save Test.md && Re-GenerateLinks):
|
||||
:edit $HOME/testmarkdown/Test.md\<CR>
|
||||
@@ -90,6 +96,8 @@ Expect (The links with a header with file Test):
|
||||
- [Generated Links](Test)
|
||||
- [Buzz Bozz](buzz_bozz)
|
||||
- [Test Wiki](index)
|
||||
- [link_syntax](link_syntax)
|
||||
- [link_syntax/nested](link_syntax/nested)
|
||||
|
||||
Execute (Clean: Remove Test.md):
|
||||
call DeleteFile('$HOME/testmarkdown/Test.md')
|
||||
@@ -180,6 +188,12 @@ Do (Edit diary.md && GenerateDiaryLinks):
|
||||
Expect (diary index generated):
|
||||
# Diary
|
||||
|
||||
## 2020
|
||||
|
||||
### July
|
||||
|
||||
- [2020-07-22](2020-07-22)
|
||||
|
||||
## 2019
|
||||
|
||||
### December
|
||||
|
||||
Reference in New Issue
Block a user