aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/help_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2022-10-18 10:18:44 -0400
committerGitHub <noreply@github.com>2022-10-18 07:18:44 -0700
commitef4c339fb9de87f7534303e006c281e40327f803 (patch)
treeeefdc8944dc3c70b5ec283366964f30955bb38dd /test/functional/lua/help_spec.lua
parent4d896be681d9b93ebe34cce38a5e787cd0332261 (diff)
downloadrneovim-ef4c339fb9de87f7534303e006c281e40327f803.tar.gz
rneovim-ef4c339fb9de87f7534303e006c281e40327f803.tar.bz2
rneovim-ef4c339fb9de87f7534303e006c281e40327f803.zip
feat(docs): update parser, HTML gen #20720
Note: although the tolerance in help_spec.lua increased, the actual error count with the new parser decreased by about 20%. The difference is that the old ignore_parse_error() ignored many more errors with the old parser. fix https://github.com/neovim/tree-sitter-vimdoc/issues/37 fix https://github.com/neovim/tree-sitter-vimdoc/issues/44 fix https://github.com/neovim/tree-sitter-vimdoc/issues/47
Diffstat (limited to 'test/functional/lua/help_spec.lua')
-rw-r--r--test/functional/lua/help_spec.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/functional/lua/help_spec.lua b/test/functional/lua/help_spec.lua
index 242897336d..f5e67ec636 100644
--- a/test/functional/lua/help_spec.lua
+++ b/test/functional/lua/help_spec.lua
@@ -19,10 +19,11 @@ describe(':help docs', function()
local rv = exec_lua([[return require('scripts.gen_help_html').validate('./build/runtime/doc')]])
-- Check that we actually found helpfiles.
ok(rv.helpfiles > 100, '>100 :help files', rv.helpfiles)
+ eq({}, rv.invalid_links, 'found invalid :help tag links')
+ eq({}, rv.invalid_urls, 'found invalid URLs in :help docs')
-- Check that parse errors did not increase wildly.
-- TODO: Fix all parse errors in :help files.
- ok(rv.err_count < 100, '<100 parse errors', rv.err_count)
- eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links))
+ ok(rv.err_count < 350, '<350 parse errors', rv.err_count)
end)
it('gen_help_html.lua generates HTML', function()
@@ -43,7 +44,7 @@ describe(':help docs', function()
tmpdir
)
eq(4, #rv.helpfiles)
- ok(rv.err_count == 0, '0 parse errors', rv.err_count)
- eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links))
+ ok(rv.err_count < 25, '<25 parse errors', rv.err_count)
+ eq({}, rv.invalid_links, 'found invalid :help tag links')
end)
end)