1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:30:05 +08:00
SpaceVim/test/lua/plugin/a.vader
2024-03-22 20:15:00 +08:00

19 lines
1.2 KiB
Plaintext

Execute ( SpaceVim plugin: a.lua ):
if !has('nvim-0.7.2')
Log 'skip lua test'
finish
endif
call SpaceVim#plugins#a#set_config_name(getcwd(), '.SpaceVim.d/projections.toml')
let root = SpaceVim#plugins#a#getConfigPath()
AssertEqual SpaceVim#plugins#a#get_alt('docs/index.md', root, 1), 'docs/cn/index.md'
AssertEqual SpaceVim#plugins#a#get_alt('docs/cn/index.md', root, 1), 'docs/index.md'
AssertEqual SpaceVim#plugins#a#get_alt('docs/api/job.md', root, 1), 'docs/cn/api/job.md'
AssertEqual SpaceVim#plugins#a#get_alt('docs/cn/api/job.md', root, 1), 'docs/api/job.md'
AssertEqual SpaceVim#plugins#a#get_alt('docs/_posts/2018-09-28-use-vim-as-ide.md', root, 1), 'docs/_posts/2018-09-27-use-vim-as-ide.md'
AssertEqual SpaceVim#plugins#a#get_alt('docs/_posts/2018-09-27-use-vim-as-ide.md', root, 1), 'docs/_posts/2018-09-28-use-vim-as-ide.md'
AssertEqual SpaceVim#plugins#a#get_alt('docs/_posts/2020-01-28-manage-project-alternate-files.md', root, 1), 'docs/_posts/2020-01-27-manage-project-alternate-files.md'
AssertEqual SpaceVim#plugins#a#get_alt('docs/_posts/2020-01-27-manage-project-alternate-files.md', root, 1), 'docs/_posts/2020-01-28-manage-project-alternate-files.md'
unlet root